mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1915351
part 1 - make GetNativeClipboardSequenceNumber public r=geckoview-reviewers,win-reviewers,handyman,m_kato
This is used in later patches to determine whether we have run content analysis on the current clipboard contents. Differential Revision: https://phabricator.services.mozilla.com/D223410
This commit is contained in:
parent
2b56bf1bac
commit
2a54251771
@ -20,6 +20,9 @@ class nsClipboard final : public nsBaseClipboard {
|
||||
static nsresult GetTextFromTransferable(nsITransferable* aTransferable,
|
||||
nsString& aText, nsString& aHTML);
|
||||
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
||||
protected:
|
||||
// Implement the native clipboard behavior.
|
||||
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
|
||||
@ -27,8 +30,6 @@ class nsClipboard final : public nsBaseClipboard {
|
||||
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
@ -39,6 +39,8 @@ class nsClipboard : public nsBaseClipboard {
|
||||
static NSString* WrapHtmlForSystemPasteboard(NSString* aString);
|
||||
static nsresult TransferableFromPasteboard(nsITransferable* aTransferable,
|
||||
NSPasteboard* pboard);
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
||||
protected:
|
||||
// Implement the native clipboard behavior.
|
||||
@ -47,8 +49,6 @@ class nsClipboard : public nsBaseClipboard {
|
||||
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
@ -114,6 +114,9 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
|
||||
void OwnerChangedEvent(GtkClipboard* aGtkClipboard,
|
||||
GdkEventOwnerChange* aEvent);
|
||||
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
||||
protected:
|
||||
// Implement the native clipboard behavior.
|
||||
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
|
||||
@ -124,8 +127,6 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
|
||||
ClipboardType aWhichClipboard,
|
||||
GetDataCallback&& aCallback) override;
|
||||
nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
@ -19,6 +19,8 @@ class HeadlessClipboard final : public nsBaseClipboard {
|
||||
HeadlessClipboard();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
||||
protected:
|
||||
~HeadlessClipboard() = default;
|
||||
@ -29,8 +31,6 @@ class HeadlessClipboard final : public nsBaseClipboard {
|
||||
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
@ -82,6 +82,8 @@ class nsBaseClipboard : public nsIClipboard {
|
||||
|
||||
mozilla::Maybe<uint64_t> GetClipboardCacheInnerWindowId(
|
||||
ClipboardType aClipboardType);
|
||||
virtual mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~nsBaseClipboard();
|
||||
@ -95,8 +97,6 @@ class nsBaseClipboard : public nsIClipboard {
|
||||
ClipboardType aWhichClipboard,
|
||||
GetDataCallback&& aCallback);
|
||||
virtual nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) = 0;
|
||||
virtual mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) = 0;
|
||||
virtual mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) = 0;
|
||||
|
@ -64,6 +64,8 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
|
||||
static UINT GetClipboardFileDescriptorFormatW();
|
||||
static UINT GetHtmlClipboardFormat();
|
||||
static UINT GetCustomClipboardFormat();
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
||||
protected:
|
||||
// @param aDataObject must be non-nullptr.
|
||||
@ -76,8 +78,6 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
|
||||
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
nsresult EmptyNativeClipboardData(ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
|
||||
ClipboardType aWhichClipboard) override;
|
||||
mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
|
||||
const nsTArray<nsCString>& aFlavorList,
|
||||
ClipboardType aWhichClipboard) override;
|
||||
|
Loading…
Reference in New Issue
Block a user