refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)
This commit is contained in:
parent
2a2a1a834c
commit
65a980c673
231 changed files with 918 additions and 576 deletions
|
@ -19,6 +19,12 @@ class ElectronDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
|||
explicit ElectronDesktopNativeWidgetAura(
|
||||
NativeWindowViews* native_window_view);
|
||||
|
||||
// disable copy
|
||||
ElectronDesktopNativeWidgetAura(const ElectronDesktopNativeWidgetAura&) =
|
||||
delete;
|
||||
ElectronDesktopNativeWidgetAura& operator=(
|
||||
const ElectronDesktopNativeWidgetAura&) = delete;
|
||||
|
||||
// views::DesktopNativeWidgetAura:
|
||||
void InitNativeWidget(views::Widget::InitParams params) override;
|
||||
|
||||
|
@ -34,8 +40,6 @@ class ElectronDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
|||
|
||||
// Owned by DesktopNativeWidgetAura.
|
||||
views::DesktopWindowTreeHost* desktop_window_tree_host_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronDesktopNativeWidgetAura);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -20,6 +20,12 @@ class ElectronDesktopWindowTreeHostWin
|
|||
views::DesktopNativeWidgetAura* desktop_native_widget_aura);
|
||||
~ElectronDesktopWindowTreeHostWin() override;
|
||||
|
||||
// disable copy
|
||||
ElectronDesktopWindowTreeHostWin(const ElectronDesktopWindowTreeHostWin&) =
|
||||
delete;
|
||||
ElectronDesktopWindowTreeHostWin& operator=(
|
||||
const ElectronDesktopWindowTreeHostWin&) = delete;
|
||||
|
||||
protected:
|
||||
bool PreHandleMSG(UINT message,
|
||||
WPARAM w_param,
|
||||
|
@ -33,8 +39,6 @@ class ElectronDesktopWindowTreeHostWin
|
|||
|
||||
private:
|
||||
NativeWindowViews* native_window_view_; // weak ref
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronDesktopWindowTreeHostWin);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -91,6 +90,10 @@ class JumpList {
|
|||
explicit JumpList(const std::wstring& app_id);
|
||||
~JumpList();
|
||||
|
||||
// disable copy
|
||||
JumpList(const JumpList&) = delete;
|
||||
JumpList& operator=(const JumpList&) = delete;
|
||||
|
||||
// Starts a new transaction, must be called before appending any categories,
|
||||
// aborting or committing. After the method returns |min_items| will indicate
|
||||
// the minimum number of items that will be displayed in the Jump List, and
|
||||
|
@ -113,8 +116,6 @@ class JumpList {
|
|||
private:
|
||||
std::wstring app_id_;
|
||||
CComPtr<ICustomDestinationList> destinations_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(JumpList);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/win/scoped_gdi_object.h"
|
||||
#include "shell/browser/ui/tray_icon.h"
|
||||
#include "shell/browser/ui/win/notify_icon_host.h"
|
||||
|
@ -104,8 +103,6 @@ class NotifyIcon : public TrayIcon {
|
|||
std::unique_ptr<views::MenuRunner> menu_runner_;
|
||||
|
||||
base::WeakPtrFactory<NotifyIcon> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NotifyIcon);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "shell/common/gin_converters/guid_converter.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
|
||||
|
@ -24,6 +23,10 @@ class NotifyIconHost {
|
|||
NotifyIconHost();
|
||||
~NotifyIconHost();
|
||||
|
||||
// disable copy
|
||||
NotifyIconHost(const NotifyIconHost&) = delete;
|
||||
NotifyIconHost& operator=(const NotifyIconHost&) = delete;
|
||||
|
||||
NotifyIcon* CreateNotifyIcon(absl::optional<UUID> guid);
|
||||
void Remove(NotifyIcon* notify_icon);
|
||||
|
||||
|
@ -61,8 +64,6 @@ class NotifyIconHost {
|
|||
// The message ID of the "TaskbarCreated" message, sent to us when we need to
|
||||
// reset our status icons.
|
||||
UINT taskbar_created_message_ = 0;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NotifyIconHost);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -35,6 +35,10 @@ class TaskbarHost {
|
|||
TaskbarHost();
|
||||
virtual ~TaskbarHost();
|
||||
|
||||
// disable copy
|
||||
TaskbarHost(const TaskbarHost&) = delete;
|
||||
TaskbarHost& operator=(const TaskbarHost&) = delete;
|
||||
|
||||
// Add or update the buttons in thumbar.
|
||||
bool SetThumbarButtons(HWND window,
|
||||
const std::vector<ThumbarButton>& buttons);
|
||||
|
@ -76,8 +80,6 @@ class TaskbarHost {
|
|||
|
||||
// Whether we have already added the buttons to thumbar.
|
||||
bool thumbar_buttons_added_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TaskbarHost);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue