Bug 1856052 - Remove unused parameter from SetNativeClipboardData; r=geckoview-reviewers,win-reviewers,spohl,mhowell,m_kato

After bug 1851817, all platforms uses nsBaseClipboard as base class and clipboard
owner is handled there, so nsIClipboardOwner parameter is unused.

Differential Revision: https://phabricator.services.mozilla.com/D190236
This commit is contained in:
Edgar Chen 2023-10-17 13:15:31 +00:00
Родитель 7098b053fe
Коммит 96afd3a327
12 изменённых файлов: 11 добавлений и 17 удалений

Просмотреть файл

@ -38,7 +38,6 @@ nsClipboard::~nsClipboard() {
NS_IMETHODIMP
nsClipboard::SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) {
MOZ_DIAGNOSTIC_ASSERT(aTransferable);
MOZ_DIAGNOSTIC_ASSERT(

Просмотреть файл

@ -20,7 +20,6 @@ class nsClipboard final : public nsBaseClipboard {
protected:
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) override;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;

Просмотреть файл

@ -30,16 +30,19 @@ class nsClipboard : public nsBaseClipboard {
static int32_t sSelectionCacheChangeCount;
// Helper methods, used also by nsDragService
static NSDictionary* PasteboardDictFromTransferable(nsITransferable* aTransferable);
static NSDictionary* PasteboardDictFromTransferable(
nsITransferable* aTransferable);
// aPasteboardType is being retained and needs to be released by the caller.
static bool IsStringType(const nsCString& aMIMEType, NSString** aPasteboardType);
static bool IsStringType(const nsCString& aMIMEType,
NSString** aPasteboardType);
static bool IsImageType(const nsACString& aMIMEType);
static NSString* WrapHtmlForSystemPasteboard(NSString* aString);
static nsresult TransferableFromPasteboard(nsITransferable* aTransferable, NSPasteboard* pboard);
static nsresult TransferableFromPasteboard(nsITransferable* aTransferable,
NSPasteboard* pboard);
protected:
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable, nsIClipboardOwner* aOwner,
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;
@ -55,7 +58,8 @@ class nsClipboard : public nsBaseClipboard {
private:
virtual ~nsClipboard();
static mozilla::Maybe<uint32_t> FindIndexOfImageFlavor(const nsTArray<nsCString>& aMIMETypes);
static mozilla::Maybe<uint32_t> FindIndexOfImageFlavor(
const nsTArray<nsCString>& aMIMETypes);
};
#endif // nsClipboard_h_

Просмотреть файл

@ -82,7 +82,6 @@ void nsClipboard::ClearSelectionCache() { SetSelectionCache(nullptr); }
NS_IMETHODIMP
nsClipboard::SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN;

Просмотреть файл

@ -249,7 +249,6 @@ nsClipboard::Observe(nsISupports* aSubject, const char* aTopic,
NS_IMETHODIMP
nsClipboard::SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) {
MOZ_DIAGNOSTIC_ASSERT(aTransferable);
MOZ_DIAGNOSTIC_ASSERT(

Просмотреть файл

@ -130,7 +130,6 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
protected:
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) override;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;

Просмотреть файл

@ -24,7 +24,6 @@ HeadlessClipboard::HeadlessClipboard()
NS_IMETHODIMP
HeadlessClipboard::SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) {
MOZ_DIAGNOSTIC_ASSERT(aTransferable);
MOZ_DIAGNOSTIC_ASSERT(

Просмотреть файл

@ -25,7 +25,6 @@ class HeadlessClipboard final : public nsBaseClipboard {
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) override;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;

Просмотреть файл

@ -192,7 +192,7 @@ NS_IMETHODIMP nsBaseClipboard::SetData(nsITransferable* aTransferable,
mIgnoreEmptyNotification = true;
// Reject existing pending asyncSetData request if any.
RejectPendingAsyncSetDataRequestIfAny(aWhichClipboard);
rv = SetNativeClipboardData(aTransferable, aOwner, aWhichClipboard);
rv = SetNativeClipboardData(aTransferable, aWhichClipboard);
mIgnoreEmptyNotification = false;
}
if (NS_FAILED(rv)) {

Просмотреть файл

@ -65,7 +65,6 @@ class nsBaseClipboard : public nsIClipboard {
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) = 0;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) = 0;

Просмотреть файл

@ -474,8 +474,7 @@ static void RepeatedlyTryOleSetClipboard(IDataObject* aDataObj) {
//-------------------------------------------------------------------------
NS_IMETHODIMP nsClipboard::SetNativeClipboardData(
nsITransferable* aTransferable, nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) {
nsITransferable* aTransferable, int32_t aWhichClipboard) {
MOZ_CLIPBOARD_LOG("%s", __FUNCTION__);
if (aWhichClipboard != kGlobalClipboard) {

Просмотреть файл

@ -72,7 +72,6 @@ class nsClipboard : public nsBaseClipboard, public nsIObserver {
// Implement the native clipboard behavior.
NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
nsIClipboardOwner* aOwner,
int32_t aWhichClipboard) override;
NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
int32_t aWhichClipboard) override;