summaryrefslogtreecommitdiff
path: root/widget/nsTransferable.h
diff options
context:
space:
mode:
authorSandra <sandra_oth@ua.fm>2023-04-11 11:58:51 +0300
committerSandra <sandra_oth@ua.fm>2023-04-11 11:58:51 +0300
commit1efbe485bb55d7312b2a09aac9948bc301393940 (patch)
tree922b8c37a5296d15ba32abc9e06ff9c71089c1c9 /widget/nsTransferable.h
parentff29aa37a86fcbc97cba6870d7bdb50020b442ae (diff)
downloaduxp-1efbe485bb55d7312b2a09aac9948bc301393940.tar.gz
Use nsAnonymousTemporaryFile for clipboard cache
Base on https://github.com/mozilla/gecko-dev/commit/ecc04a9245b409d7eed7df63ba733cd2073180de
Diffstat (limited to 'widget/nsTransferable.h')
-rw-r--r--widget/nsTransferable.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/widget/nsTransferable.h b/widget/nsTransferable.h
index d0db18a46d..1be0fec3fd 100644
--- a/widget/nsTransferable.h
+++ b/widget/nsTransferable.h
@@ -6,16 +6,15 @@
#ifndef nsTransferable_h__
#define nsTransferable_h__
-#include "nsIContentPolicyBase.h"
#include "nsIFormatConverter.h"
#include "nsITransferable.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsIPrincipal.h"
+#include "prio.h"
class nsIMutableArray;
-class nsString;
//
// DataStruct
@@ -25,14 +24,13 @@ class nsString;
struct DataStruct
{
explicit DataStruct ( const char* aFlavor )
- : mDataLen(0), mFlavor(aFlavor), mCacheFileName(nullptr) { }
+ : mDataLen(0), mFlavor(aFlavor), mCacheFD(nullptr) { }
~DataStruct();
const nsCString& GetFlavor() const { return mFlavor; }
void SetData( nsISupports* inData, uint32_t inDataLen, bool aIsPrivateData );
void GetData( nsISupports** outData, uint32_t *outDataLen );
- already_AddRefed<nsIFile> GetFileSpec(const char* aFileName);
- bool IsDataAvailable() const { return (mData && mDataLen > 0) || (!mData && mCacheFileName); }
+ bool IsDataAvailable() const { return mData ? mDataLen > 0 : mCacheFD != nullptr; }
protected:
@@ -47,8 +45,8 @@ protected:
nsCOMPtr<nsISupports> mData; // OWNER - some varient of primitive wrapper
uint32_t mDataLen;
+ PRFileDesc* mCacheFD;
const nsCString mFlavor;
- char * mCacheFileName;
};