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
|
@ -23,6 +23,10 @@ class AutofillPopup : public views::ViewObserver {
|
|||
AutofillPopup();
|
||||
~AutofillPopup() override;
|
||||
|
||||
// disable copy
|
||||
AutofillPopup(const AutofillPopup&) = delete;
|
||||
AutofillPopup& operator=(const AutofillPopup&) = delete;
|
||||
|
||||
void CreateView(content::RenderFrameHost* render_frame,
|
||||
content::RenderFrameHost* embedder_frame,
|
||||
bool offscreen,
|
||||
|
@ -82,8 +86,6 @@ class AutofillPopup : public views::ViewObserver {
|
|||
|
||||
// The parent view that the popup view shows on. Weak ref.
|
||||
views::View* parent_ = nullptr;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutofillPopup);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -16,14 +16,16 @@ class DelayedNativeViewHost : public views::NativeViewHost {
|
|||
explicit DelayedNativeViewHost(gfx::NativeView native_view);
|
||||
~DelayedNativeViewHost() override;
|
||||
|
||||
// disable copy
|
||||
DelayedNativeViewHost(const DelayedNativeViewHost&) = delete;
|
||||
DelayedNativeViewHost& operator=(const DelayedNativeViewHost&) = delete;
|
||||
|
||||
// views::View:
|
||||
void ViewHierarchyChanged(
|
||||
const views::ViewHierarchyChangedDetails& details) override;
|
||||
|
||||
private:
|
||||
gfx::NativeView native_view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DelayedNativeViewHost);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -18,6 +18,10 @@ class ElectronNativeWidgetMac : public views::NativeWidgetMac {
|
|||
views::internal::NativeWidgetDelegate* delegate);
|
||||
~ElectronNativeWidgetMac() override;
|
||||
|
||||
// disable copy
|
||||
ElectronNativeWidgetMac(const ElectronNativeWidgetMac&) = delete;
|
||||
ElectronNativeWidgetMac& operator=(const ElectronNativeWidgetMac&) = delete;
|
||||
|
||||
protected:
|
||||
// NativeWidgetMac:
|
||||
NativeWidgetMacNSWindow* CreateNSWindow(
|
||||
|
@ -26,8 +30,6 @@ class ElectronNativeWidgetMac : public views::NativeWidgetMac {
|
|||
private:
|
||||
NativeWindowMac* shell_;
|
||||
NSUInteger style_mask_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronNativeWidgetMac);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -16,6 +16,10 @@ class RootViewMac : public views::View {
|
|||
explicit RootViewMac(NativeWindow* window);
|
||||
~RootViewMac() override;
|
||||
|
||||
// disable copy
|
||||
RootViewMac(const RootViewMac&) = delete;
|
||||
RootViewMac& operator=(const RootViewMac&) = delete;
|
||||
|
||||
// views::View:
|
||||
void Layout() override;
|
||||
gfx::Size GetMinimumSize() const override;
|
||||
|
@ -24,8 +28,6 @@ class RootViewMac : public views::View {
|
|||
private:
|
||||
// Parent window, weak ref.
|
||||
NativeWindow* window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RootViewMac);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -14,14 +14,15 @@ class ViewsDelegateMac : public views::ViewsDelegate {
|
|||
ViewsDelegateMac();
|
||||
~ViewsDelegateMac() override;
|
||||
|
||||
// disable copy
|
||||
ViewsDelegateMac(const ViewsDelegateMac&) = delete;
|
||||
ViewsDelegateMac& operator=(const ViewsDelegateMac&) = delete;
|
||||
|
||||
// ViewsDelegate:
|
||||
void OnBeforeWidgetInit(
|
||||
views::Widget::InitParams* params,
|
||||
views::internal::NativeWidgetDelegate* delegate) override;
|
||||
ui::ContextFactory* GetContextFactory() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ViewsDelegateMac);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -41,6 +41,10 @@ class TCPServerSocketFactory : public content::DevToolsSocketFactory {
|
|||
TCPServerSocketFactory(const std::string& address, int port)
|
||||
: address_(address), port_(port) {}
|
||||
|
||||
// disable copy
|
||||
TCPServerSocketFactory(const TCPServerSocketFactory&) = delete;
|
||||
TCPServerSocketFactory& operator=(const TCPServerSocketFactory&) = delete;
|
||||
|
||||
private:
|
||||
// content::ServerSocketFactory.
|
||||
std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
|
||||
|
@ -58,8 +62,6 @@ class TCPServerSocketFactory : public content::DevToolsSocketFactory {
|
|||
|
||||
std::string address_;
|
||||
uint16_t port_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
|
||||
};
|
||||
|
||||
std::unique_ptr<content::DevToolsSocketFactory> CreateSocketFactory() {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "content/public/browser/devtools_manager_delegate.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -20,6 +19,10 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
|
|||
DevToolsManagerDelegate();
|
||||
~DevToolsManagerDelegate() override;
|
||||
|
||||
// disable copy
|
||||
DevToolsManagerDelegate(const DevToolsManagerDelegate&) = delete;
|
||||
DevToolsManagerDelegate& operator=(const DevToolsManagerDelegate&) = delete;
|
||||
|
||||
// DevToolsManagerDelegate implementation.
|
||||
void Inspect(content::DevToolsAgentHost* agent_host) override;
|
||||
void HandleCommand(content::DevToolsAgentHostClientChannel* channel,
|
||||
|
@ -29,9 +32,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
|
|||
const GURL& url) override;
|
||||
std::string GetDiscoveryPageHTML() override;
|
||||
bool HasBundledFrontendResources() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegate);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -70,6 +70,10 @@ class BundledDataSource : public content::URLDataSource {
|
|||
BundledDataSource() = default;
|
||||
~BundledDataSource() override = default;
|
||||
|
||||
// disable copy
|
||||
BundledDataSource(const BundledDataSource&) = delete;
|
||||
BundledDataSource& operator=(const BundledDataSource&) = delete;
|
||||
|
||||
// content::URLDataSource implementation.
|
||||
std::string GetSource() override { return chrome::kChromeUIDevToolsHost; }
|
||||
|
||||
|
@ -113,9 +117,6 @@ class BundledDataSource : public content::URLDataSource {
|
|||
"--debug-devtools.";
|
||||
std::move(callback).Run(bytes);
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(BundledDataSource);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -16,8 +16,9 @@ class DevToolsUI : public content::WebUIController {
|
|||
explicit DevToolsUI(content::BrowserContext* browser_context,
|
||||
content::WebUI* web_ui);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(DevToolsUI);
|
||||
// disable copy
|
||||
DevToolsUI(const DevToolsUI&) = delete;
|
||||
DevToolsUI& operator=(const DevToolsUI&) = delete;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -74,6 +74,10 @@ class ElectronMenuModel : public ui::SimpleMenuModel {
|
|||
explicit ElectronMenuModel(Delegate* delegate);
|
||||
~ElectronMenuModel() override;
|
||||
|
||||
// disable copy
|
||||
ElectronMenuModel(const ElectronMenuModel&) = delete;
|
||||
ElectronMenuModel& operator=(const ElectronMenuModel&) = delete;
|
||||
|
||||
void AddObserver(Observer* obs) { observers_.AddObserver(obs); }
|
||||
void RemoveObserver(Observer* obs) { observers_.RemoveObserver(obs); }
|
||||
|
||||
|
@ -120,8 +124,6 @@ class ElectronMenuModel : public ui::SimpleMenuModel {
|
|||
base::ObserverList<Observer> observers_;
|
||||
|
||||
base::WeakPtrFactory<ElectronMenuModel> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronMenuModel);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -213,6 +213,10 @@ class FileChooserDialog {
|
|||
parent_->SetEnabled(true);
|
||||
}
|
||||
|
||||
// disable copy
|
||||
FileChooserDialog(const FileChooserDialog&) = delete;
|
||||
FileChooserDialog& operator=(const FileChooserDialog&) = delete;
|
||||
|
||||
void SetupOpenProperties(int properties) {
|
||||
const auto hasProp = [properties](OpenFileDialogProperty prop) {
|
||||
return gboolean((properties & prop) != 0);
|
||||
|
@ -311,8 +315,6 @@ class FileChooserDialog {
|
|||
|
||||
// Callback for when we update the preview for the selection.
|
||||
CHROMEG_CALLBACK_0(FileChooserDialog, void, OnUpdatePreview, GtkFileChooser*);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FileChooserDialog);
|
||||
};
|
||||
|
||||
void FileChooserDialog::OnFileDialogResponse(GtkWidget* widget, int response) {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
|
@ -44,6 +43,10 @@ class AppIndicatorIcon : public views::StatusIconLinux {
|
|||
const std::u16string& tool_tip);
|
||||
~AppIndicatorIcon() override;
|
||||
|
||||
// disable copy
|
||||
AppIndicatorIcon(const AppIndicatorIcon&) = delete;
|
||||
AppIndicatorIcon& operator=(const AppIndicatorIcon&) = delete;
|
||||
|
||||
// Indicates whether libappindicator so could be opened.
|
||||
static bool CouldOpen();
|
||||
|
||||
|
@ -105,8 +108,6 @@ class AppIndicatorIcon : public views::StatusIconLinux {
|
|||
int icon_change_count_ = 0;
|
||||
|
||||
base::WeakPtrFactory<AppIndicatorIcon> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AppIndicatorIcon);
|
||||
};
|
||||
|
||||
} // namespace gtkui
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/macros.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
|
||||
typedef struct _GtkMenu GtkMenu;
|
||||
|
@ -26,6 +25,10 @@ class AppIndicatorIconMenu {
|
|||
explicit AppIndicatorIconMenu(ui::MenuModel* model);
|
||||
virtual ~AppIndicatorIconMenu();
|
||||
|
||||
// disable copy
|
||||
AppIndicatorIconMenu(const AppIndicatorIconMenu&) = delete;
|
||||
AppIndicatorIconMenu& operator=(const AppIndicatorIconMenu&) = delete;
|
||||
|
||||
// Sets a menu item at the top of |gtk_menu_| as a replacement for the app
|
||||
// indicator icon's click action. |callback| is called when the menu item
|
||||
// is activated.
|
||||
|
@ -65,8 +68,6 @@ class AppIndicatorIconMenu {
|
|||
GtkWidget* gtk_menu_ = nullptr;
|
||||
|
||||
bool block_activation_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AppIndicatorIconMenu);
|
||||
};
|
||||
|
||||
} // namespace gtkui
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "ui/base/glib/glib_integers.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/views/linux_ui/status_icon_linux.h"
|
||||
|
@ -34,6 +33,10 @@ class GtkStatusIcon : public views::StatusIconLinux {
|
|||
GtkStatusIcon(const gfx::ImageSkia& image, const std::u16string& tool_tip);
|
||||
~GtkStatusIcon() override;
|
||||
|
||||
// disable copy
|
||||
GtkStatusIcon(const GtkStatusIcon&) = delete;
|
||||
GtkStatusIcon& operator=(const GtkStatusIcon&) = delete;
|
||||
|
||||
// Overridden from views::StatusIconLinux:
|
||||
void SetIcon(const gfx::ImageSkia& image) override;
|
||||
void SetToolTip(const std::u16string& tool_tip) override;
|
||||
|
@ -53,8 +56,6 @@ class GtkStatusIcon : public views::StatusIconLinux {
|
|||
::GtkStatusIcon* gtk_status_icon_;
|
||||
|
||||
std::unique_ptr<AppIndicatorIconMenu> menu_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GtkStatusIcon);
|
||||
};
|
||||
|
||||
} // namespace gtkui
|
||||
|
|
|
@ -51,6 +51,10 @@ class InspectableWebContents
|
|||
bool is_guest);
|
||||
~InspectableWebContents() override;
|
||||
|
||||
// disable copy
|
||||
InspectableWebContents(const InspectableWebContents&) = delete;
|
||||
InspectableWebContents& operator=(const InspectableWebContents&) = delete;
|
||||
|
||||
InspectableWebContentsView* GetView() const;
|
||||
content::WebContents* GetWebContents() const;
|
||||
content::WebContents* GetDevToolsWebContents() const;
|
||||
|
@ -238,8 +242,6 @@ class InspectableWebContents
|
|||
base::flat_set<std::string> synced_setting_names_;
|
||||
|
||||
base::WeakPtrFactory<InspectableWebContents> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContents);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -127,6 +127,10 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
}
|
||||
}
|
||||
|
||||
// disable copy
|
||||
GtkMessageBox(const GtkMessageBox&) = delete;
|
||||
GtkMessageBox& operator=(const GtkMessageBox&) = delete;
|
||||
|
||||
GtkMessageType GetMessageType(MessageBoxType type) {
|
||||
switch (type) {
|
||||
case MessageBoxType::kInformation:
|
||||
|
@ -205,8 +209,6 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
NativeWindow* parent_;
|
||||
GtkWidget* dialog_;
|
||||
MessageBoxCallback callback_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GtkMessageBox);
|
||||
};
|
||||
|
||||
void GtkMessageBox::OnResponseDialog(GtkWidget* widget, int response) {
|
||||
|
|
|
@ -28,6 +28,10 @@ class TrayIcon {
|
|||
|
||||
virtual ~TrayIcon();
|
||||
|
||||
// disable copy
|
||||
TrayIcon(const TrayIcon&) = delete;
|
||||
TrayIcon& operator=(const TrayIcon&) = delete;
|
||||
|
||||
// Sets the image associated with this status icon.
|
||||
virtual void SetImage(ImageType image) = 0;
|
||||
|
||||
|
@ -129,8 +133,6 @@ class TrayIcon {
|
|||
|
||||
private:
|
||||
base::ObserverList<TrayIconObserver> observers_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TrayIcon);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -44,8 +44,6 @@ class TrayIconCocoa : public TrayIcon {
|
|||
base::scoped_nsobject<ElectronMenuController> menu_;
|
||||
|
||||
base::WeakPtrFactory<TrayIconCocoa> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TrayIconCocoa);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -38,8 +38,6 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate {
|
|||
gfx::ImageSkia image_;
|
||||
std::u16string tool_tip_;
|
||||
ui::MenuModel* menu_model_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TrayIconGtk);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -42,6 +42,10 @@ class AutofillPopupChildView : public views::View {
|
|||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
}
|
||||
|
||||
// disable copy
|
||||
AutofillPopupChildView(const AutofillPopupChildView&) = delete;
|
||||
AutofillPopupChildView& operator=(const AutofillPopupChildView&) = delete;
|
||||
|
||||
private:
|
||||
~AutofillPopupChildView() override {}
|
||||
|
||||
|
@ -49,8 +53,6 @@ class AutofillPopupChildView : public views::View {
|
|||
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
|
||||
|
||||
std::u16string suggestion_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutofillPopupChildView);
|
||||
};
|
||||
|
||||
class AutofillPopupView : public views::WidgetDelegateView,
|
||||
|
|
|
@ -19,6 +19,10 @@ class ViewsDelegate : public views::ViewsDelegate {
|
|||
ViewsDelegate();
|
||||
~ViewsDelegate() override;
|
||||
|
||||
// disable copy
|
||||
ViewsDelegate(const ViewsDelegate&) = delete;
|
||||
ViewsDelegate& operator=(const ViewsDelegate&) = delete;
|
||||
|
||||
protected:
|
||||
// views::ViewsDelegate:
|
||||
void SaveWindowPlacement(const views::Widget* window,
|
||||
|
@ -71,8 +75,6 @@ class ViewsDelegate : public views::ViewsDelegate {
|
|||
|
||||
base::WeakPtrFactory<ViewsDelegate> weak_factory_{this};
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ViewsDelegate);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -21,6 +21,10 @@ class FramelessView : public views::NonClientFrameView {
|
|||
FramelessView();
|
||||
~FramelessView() override;
|
||||
|
||||
// disable copy
|
||||
FramelessView(const FramelessView&) = delete;
|
||||
FramelessView& operator=(const FramelessView&) = delete;
|
||||
|
||||
virtual void Init(NativeWindowViews* window, views::Widget* frame);
|
||||
|
||||
// Returns whether the |point| is on frameless window's resizing border.
|
||||
|
@ -49,9 +53,6 @@ class FramelessView : public views::NonClientFrameView {
|
|||
views::Widget* frame_ = nullptr;
|
||||
|
||||
friend class NativeWindowsViews;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(FramelessView);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -33,6 +33,11 @@ class GlobalMenuBarRegistrarX11 {
|
|||
GlobalMenuBarRegistrarX11();
|
||||
~GlobalMenuBarRegistrarX11();
|
||||
|
||||
// disable copy
|
||||
GlobalMenuBarRegistrarX11(const GlobalMenuBarRegistrarX11&) = delete;
|
||||
GlobalMenuBarRegistrarX11& operator=(const GlobalMenuBarRegistrarX11&) =
|
||||
delete;
|
||||
|
||||
// Sends the actual message.
|
||||
void RegisterXWindow(x11::Window window);
|
||||
void UnregisterXWindow(x11::Window window);
|
||||
|
@ -53,8 +58,6 @@ class GlobalMenuBarRegistrarX11 {
|
|||
// x11::Window which want to be registered, but haven't yet been because
|
||||
// we're waiting for the proxy to become available.
|
||||
std::set<x11::Window> live_windows_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarRegistrarX11);
|
||||
};
|
||||
|
||||
#endif // SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "shell/browser/ui/electron_menu_model.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
@ -41,6 +40,10 @@ class GlobalMenuBarX11 {
|
|||
explicit GlobalMenuBarX11(NativeWindowViews* window);
|
||||
virtual ~GlobalMenuBarX11();
|
||||
|
||||
// disable copy
|
||||
GlobalMenuBarX11(const GlobalMenuBarX11&) = delete;
|
||||
GlobalMenuBarX11& operator=(const GlobalMenuBarX11&) = delete;
|
||||
|
||||
// Creates the object path for DbusmenuServer which is attached to |window|.
|
||||
static std::string GetPathForWindow(x11::Window window);
|
||||
|
||||
|
@ -73,8 +76,6 @@ class GlobalMenuBarX11 {
|
|||
x11::Window xwindow_;
|
||||
|
||||
DbusmenuServer* server_ = nullptr;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -41,6 +41,10 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
}
|
||||
~DevToolsWindowDelegate() override = default;
|
||||
|
||||
// disable copy
|
||||
DevToolsWindowDelegate(const DevToolsWindowDelegate&) = delete;
|
||||
DevToolsWindowDelegate& operator=(const DevToolsWindowDelegate&) = delete;
|
||||
|
||||
// views::WidgetDelegate:
|
||||
views::View* GetInitiallyFocusedView() override { return view_; }
|
||||
std::u16string GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
|
@ -64,8 +68,6 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
views::View* view_;
|
||||
views::Widget* widget_;
|
||||
ui::ImageModel icon_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DevToolsWindowDelegate);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -63,8 +63,6 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
|||
bool devtools_visible_ = false;
|
||||
views::WidgetDelegate* devtools_window_delegate_ = nullptr;
|
||||
std::u16string title_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewViews);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -26,6 +26,10 @@ class MenuBar : public views::AccessiblePaneView,
|
|||
MenuBar(NativeWindow* window, RootView* root_view);
|
||||
~MenuBar() override;
|
||||
|
||||
// disable copy
|
||||
MenuBar(const MenuBar&) = delete;
|
||||
MenuBar& operator=(const MenuBar&) = delete;
|
||||
|
||||
// Replaces current menu with a new one.
|
||||
void SetMenu(ElectronMenuModel* menu_model);
|
||||
|
||||
|
@ -84,8 +88,6 @@ class MenuBar : public views::AccessiblePaneView,
|
|||
RootView* root_view_;
|
||||
ElectronMenuModel* menu_model_ = nullptr;
|
||||
bool accelerator_installed_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuBar);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -25,6 +25,10 @@ class MenuDelegate : public views::MenuDelegate {
|
|||
explicit MenuDelegate(MenuBar* menu_bar);
|
||||
~MenuDelegate() override;
|
||||
|
||||
// disable copy
|
||||
MenuDelegate(const MenuDelegate&) = delete;
|
||||
MenuDelegate& operator=(const MenuDelegate&) = delete;
|
||||
|
||||
void RunMenu(ElectronMenuModel* model,
|
||||
views::Button* button,
|
||||
ui::MenuSourceType source_type);
|
||||
|
@ -72,8 +76,6 @@ class MenuDelegate : public views::MenuDelegate {
|
|||
bool hold_first_switch_ = false;
|
||||
|
||||
base::ObserverList<Observer>::Unchecked observers_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuDelegate);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -15,13 +15,15 @@ class MenuModelAdapter : public views::MenuModelAdapter {
|
|||
explicit MenuModelAdapter(ElectronMenuModel* menu_model);
|
||||
~MenuModelAdapter() override;
|
||||
|
||||
// disable copy
|
||||
MenuModelAdapter(const MenuModelAdapter&) = delete;
|
||||
MenuModelAdapter& operator=(const MenuModelAdapter&) = delete;
|
||||
|
||||
protected:
|
||||
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
|
||||
|
||||
private:
|
||||
ElectronMenuModel* menu_model_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -18,6 +18,10 @@ class NativeFrameView : public views::NativeFrameView {
|
|||
static const char kViewClassName[];
|
||||
NativeFrameView(NativeWindow* window, views::Widget* widget);
|
||||
|
||||
// disable copy
|
||||
NativeFrameView(const NativeFrameView&) = delete;
|
||||
NativeFrameView& operator=(const NativeFrameView&) = delete;
|
||||
|
||||
protected:
|
||||
// views::View:
|
||||
gfx::Size GetMinimumSize() const override;
|
||||
|
@ -26,8 +30,6 @@ class NativeFrameView : public views::NativeFrameView {
|
|||
|
||||
private:
|
||||
NativeWindow* window_; // weak ref.
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeFrameView);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -27,6 +27,10 @@ class RootView : public views::View {
|
|||
explicit RootView(NativeWindow* window);
|
||||
~RootView() override;
|
||||
|
||||
// disable copy
|
||||
RootView(const RootView&) = delete;
|
||||
RootView& operator=(const RootView&) = delete;
|
||||
|
||||
void SetMenu(ElectronMenuModel* menu_model);
|
||||
bool HasMenu() const;
|
||||
int GetMenuBarHeight() const;
|
||||
|
@ -61,8 +65,6 @@ class RootView : public views::View {
|
|||
accelerator_util::AcceleratorTable accelerator_table_;
|
||||
|
||||
std::unique_ptr<views::ViewTracker> last_focused_view_tracker_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RootView);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -21,6 +21,10 @@ class SubmenuButton : public views::MenuButton {
|
|||
const SkColor& background_color);
|
||||
~SubmenuButton() override;
|
||||
|
||||
// disable copy
|
||||
SubmenuButton(const SubmenuButton&) = delete;
|
||||
SubmenuButton& operator=(const SubmenuButton&) = delete;
|
||||
|
||||
void SetAcceleratorVisibility(bool visible);
|
||||
void SetUnderlineColor(SkColor color);
|
||||
|
||||
|
@ -50,8 +54,6 @@ class SubmenuButton : public views::MenuButton {
|
|||
int text_height_ = 0;
|
||||
SkColor underline_color_ = SK_ColorBLACK;
|
||||
SkColor background_color_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SubmenuButton);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -81,8 +81,6 @@ class WinFrameView : public FramelessView {
|
|||
// May be null if the caption button container is destroyed before the frame
|
||||
// view. Always check for validity before using!
|
||||
WinCaptionButtonContainer* caption_button_container_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WinFrameView);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_
|
||||
#define SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "chrome/browser/accessibility/accessibility_ui.h"
|
||||
#include "content/public/browser/web_ui_controller.h"
|
||||
#include "content/public/browser/web_ui_data_source.h"
|
||||
|
@ -24,12 +23,16 @@ class ElectronAccessibilityUIMessageHandler
|
|||
public:
|
||||
ElectronAccessibilityUIMessageHandler();
|
||||
|
||||
// disable copy
|
||||
ElectronAccessibilityUIMessageHandler(
|
||||
const ElectronAccessibilityUIMessageHandler&) = delete;
|
||||
ElectronAccessibilityUIMessageHandler& operator=(
|
||||
const ElectronAccessibilityUIMessageHandler&) = delete;
|
||||
|
||||
void RegisterMessages() final;
|
||||
|
||||
private:
|
||||
void RequestNativeUITree(const base::ListValue* args);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronAccessibilityUIMessageHandler);
|
||||
};
|
||||
|
||||
#endif // SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "ui/events/event_rewriter.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -17,6 +16,10 @@ class EventDisabler : public ui::EventRewriter {
|
|||
EventDisabler();
|
||||
~EventDisabler() override;
|
||||
|
||||
// disable copy
|
||||
EventDisabler(const EventDisabler&) = delete;
|
||||
EventDisabler& operator=(const EventDisabler&) = delete;
|
||||
|
||||
// ui::EventRewriter:
|
||||
ui::EventRewriteStatus RewriteEvent(
|
||||
const ui::Event& event,
|
||||
|
@ -24,9 +27,6 @@ class EventDisabler : public ui::EventRewriter {
|
|||
ui::EventRewriteStatus NextDispatchEvent(
|
||||
const ui::Event& last_event,
|
||||
std::unique_ptr<ui::Event>* new_event) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(EventDisabler);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -17,6 +17,10 @@ class WindowStateWatcher : public x11::EventObserver {
|
|||
explicit WindowStateWatcher(NativeWindowViews* window);
|
||||
~WindowStateWatcher() override;
|
||||
|
||||
// disable copy
|
||||
WindowStateWatcher(const WindowStateWatcher&) = delete;
|
||||
WindowStateWatcher& operator=(const WindowStateWatcher&) = delete;
|
||||
|
||||
protected:
|
||||
// x11::EventObserver:
|
||||
void OnEvent(const x11::Event& x11_event) override;
|
||||
|
@ -31,8 +35,6 @@ class WindowStateWatcher : public x11::EventObserver {
|
|||
const x11::Atom net_wm_state_maximized_vert_atom_;
|
||||
const x11::Atom net_wm_state_maximized_horz_atom_;
|
||||
const x11::Atom net_wm_state_fullscreen_atom_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WindowStateWatcher);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue