refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)

This commit is contained in:
Milan Burda 2021-11-03 12:41:45 +01:00 committed by GitHub
parent 2a2a1a834c
commit 65a980c673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 918 additions and 576 deletions

View file

@ -45,8 +45,6 @@ class NotificationPresenterWin : public NotificationPresenter {
NotificationDelegate* delegate) override;
base::ScopedTempDir temp_dir_;
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin);
};
} // namespace electron

View file

@ -30,8 +30,6 @@ class NotificationPresenterWin7 : public NotificationPresenter,
void OnNotificationClicked(const Notification& notification) override;
void OnNotificationDismissed(const Notification& notification) override;
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin7);
};
} // namespace electron

View file

@ -29,8 +29,6 @@ class Win32Notification : public electron::Notification {
private:
DesktopNotificationController::Notification notification_ref_;
std::string tag_;
DISALLOW_COPY_AND_ASSIGN(Win32Notification);
};
} // namespace electron

View file

@ -106,8 +106,6 @@ class WindowsToastNotification : public Notification {
ComPtr<ToastEventHandler> event_handler_;
ComPtr<ABI::Windows::UI::Notifications::IToastNotification>
toast_notification_;
DISALLOW_COPY_AND_ASSIGN(WindowsToastNotification);
};
class ToastEventHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>,
@ -118,6 +116,10 @@ class ToastEventHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>,
explicit ToastEventHandler(Notification* notification);
~ToastEventHandler() override;
// disable copy
ToastEventHandler(const ToastEventHandler&) = delete;
ToastEventHandler& operator=(const ToastEventHandler&) = delete;
IFACEMETHODIMP Invoke(
ABI::Windows::UI::Notifications::IToastNotification* sender,
IInspectable* args) override;
@ -130,8 +132,6 @@ class ToastEventHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>,
private:
base::WeakPtr<Notification> notification_; // weak ref.
DISALLOW_COPY_AND_ASSIGN(ToastEventHandler);
};
} // namespace electron