fix: modernize-use-equals-default warnings (#44945)

fix: use '= default' to define a trivial destructor [modernize-use-equals-default]

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-12-03 21:58:53 -06:00 committed by GitHub
parent e13fc9809b
commit b1b01463fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 64 additions and 64 deletions

View file

@ -45,7 +45,7 @@ class Delegate {
const std::string& update_url) {} const std::string& update_url) {}
protected: protected:
virtual ~Delegate() {} virtual ~Delegate() = default;
}; };
class AutoUpdater { class AutoUpdater {

View file

@ -85,7 +85,7 @@ class BrowserObserver : public base::CheckedObserver {
#endif #endif
protected: protected:
~BrowserObserver() override {} ~BrowserObserver() override = default;
}; };
} // namespace electron } // namespace electron

View file

@ -25,7 +25,7 @@ class ExtendedWebContentsObserver : public base::CheckedObserver {
virtual void OnDevToolsResized() {} virtual void OnDevToolsResized() {}
protected: protected:
~ExtendedWebContentsObserver() override {} ~ExtendedWebContentsObserver() override = default;
}; };
} // namespace electron } // namespace electron

View file

@ -106,14 +106,14 @@ class ExtensionActionFunction : public ExtensionFunction {
// show // show
class ExtensionActionShowFunction : public ExtensionActionFunction { class ExtensionActionShowFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionShowFunction() override {} ~ExtensionActionShowFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// hide // hide
class ExtensionActionHideFunction : public ExtensionActionFunction { class ExtensionActionHideFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionHideFunction() override {} ~ExtensionActionHideFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
@ -123,28 +123,28 @@ class ExtensionActionSetIconFunction : public ExtensionActionFunction {
static void SetReportErrorForInvisibleIconForTesting(bool value); static void SetReportErrorForInvisibleIconForTesting(bool value);
protected: protected:
~ExtensionActionSetIconFunction() override {} ~ExtensionActionSetIconFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// setTitle // setTitle
class ExtensionActionSetTitleFunction : public ExtensionActionFunction { class ExtensionActionSetTitleFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionSetTitleFunction() override {} ~ExtensionActionSetTitleFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// setPopup // setPopup
class ExtensionActionSetPopupFunction : public ExtensionActionFunction { class ExtensionActionSetPopupFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionSetPopupFunction() override {} ~ExtensionActionSetPopupFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// setBadgeText // setBadgeText
class ExtensionActionSetBadgeTextFunction : public ExtensionActionFunction { class ExtensionActionSetBadgeTextFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionSetBadgeTextFunction() override {} ~ExtensionActionSetBadgeTextFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
@ -152,35 +152,35 @@ class ExtensionActionSetBadgeTextFunction : public ExtensionActionFunction {
class ExtensionActionSetBadgeBackgroundColorFunction class ExtensionActionSetBadgeBackgroundColorFunction
: public ExtensionActionFunction { : public ExtensionActionFunction {
protected: protected:
~ExtensionActionSetBadgeBackgroundColorFunction() override {} ~ExtensionActionSetBadgeBackgroundColorFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// getTitle // getTitle
class ExtensionActionGetTitleFunction : public ExtensionActionFunction { class ExtensionActionGetTitleFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionGetTitleFunction() override {} ~ExtensionActionGetTitleFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// getPopup // getPopup
class ExtensionActionGetPopupFunction : public ExtensionActionFunction { class ExtensionActionGetPopupFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionGetPopupFunction() override {} ~ExtensionActionGetPopupFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// openPopup // openPopup
class ExtensionActionOpenPopupFunction : public ExtensionActionFunction { class ExtensionActionOpenPopupFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionOpenPopupFunction() override {} ~ExtensionActionOpenPopupFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
// getBadgeText // getBadgeText
class ExtensionActionGetBadgeTextFunction : public ExtensionActionFunction { class ExtensionActionGetBadgeTextFunction : public ExtensionActionFunction {
protected: protected:
~ExtensionActionGetBadgeTextFunction() override {} ~ExtensionActionGetBadgeTextFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
@ -188,7 +188,7 @@ class ExtensionActionGetBadgeTextFunction : public ExtensionActionFunction {
class ExtensionActionGetBadgeBackgroundColorFunction class ExtensionActionGetBadgeBackgroundColorFunction
: public ExtensionActionFunction { : public ExtensionActionFunction {
protected: protected:
~ExtensionActionGetBadgeBackgroundColorFunction() override {} ~ExtensionActionGetBadgeBackgroundColorFunction() override = default;
ResponseAction RunExtensionAction() override; ResponseAction RunExtensionAction() override;
}; };
@ -201,7 +201,7 @@ class ActionSetIconFunction : public ExtensionActionSetIconFunction {
DECLARE_EXTENSION_FUNCTION("action.setIcon", ACTION_SETICON) DECLARE_EXTENSION_FUNCTION("action.setIcon", ACTION_SETICON)
protected: protected:
~ActionSetIconFunction() override {} ~ActionSetIconFunction() override = default;
}; };
class ActionGetPopupFunction : public ExtensionActionGetPopupFunction { class ActionGetPopupFunction : public ExtensionActionGetPopupFunction {
@ -209,7 +209,7 @@ class ActionGetPopupFunction : public ExtensionActionGetPopupFunction {
DECLARE_EXTENSION_FUNCTION("action.getPopup", ACTION_GETPOPUP) DECLARE_EXTENSION_FUNCTION("action.getPopup", ACTION_GETPOPUP)
protected: protected:
~ActionGetPopupFunction() override {} ~ActionGetPopupFunction() override = default;
}; };
class ActionSetPopupFunction : public ExtensionActionSetPopupFunction { class ActionSetPopupFunction : public ExtensionActionSetPopupFunction {
@ -217,7 +217,7 @@ class ActionSetPopupFunction : public ExtensionActionSetPopupFunction {
DECLARE_EXTENSION_FUNCTION("action.setPopup", ACTION_SETPOPUP) DECLARE_EXTENSION_FUNCTION("action.setPopup", ACTION_SETPOPUP)
protected: protected:
~ActionSetPopupFunction() override {} ~ActionSetPopupFunction() override = default;
}; };
class ActionGetTitleFunction : public ExtensionActionGetTitleFunction { class ActionGetTitleFunction : public ExtensionActionGetTitleFunction {
@ -225,7 +225,7 @@ class ActionGetTitleFunction : public ExtensionActionGetTitleFunction {
DECLARE_EXTENSION_FUNCTION("action.getTitle", ACTION_GETTITLE) DECLARE_EXTENSION_FUNCTION("action.getTitle", ACTION_GETTITLE)
protected: protected:
~ActionGetTitleFunction() override {} ~ActionGetTitleFunction() override = default;
}; };
class ActionSetTitleFunction : public ExtensionActionSetTitleFunction { class ActionSetTitleFunction : public ExtensionActionSetTitleFunction {
@ -233,7 +233,7 @@ class ActionSetTitleFunction : public ExtensionActionSetTitleFunction {
DECLARE_EXTENSION_FUNCTION("action.setTitle", ACTION_SETTITLE) DECLARE_EXTENSION_FUNCTION("action.setTitle", ACTION_SETTITLE)
protected: protected:
~ActionSetTitleFunction() override {} ~ActionSetTitleFunction() override = default;
}; };
class ActionGetBadgeTextFunction : public ExtensionActionGetBadgeTextFunction { class ActionGetBadgeTextFunction : public ExtensionActionGetBadgeTextFunction {
@ -241,7 +241,7 @@ class ActionGetBadgeTextFunction : public ExtensionActionGetBadgeTextFunction {
DECLARE_EXTENSION_FUNCTION("action.getBadgeText", ACTION_GETBADGETEXT) DECLARE_EXTENSION_FUNCTION("action.getBadgeText", ACTION_GETBADGETEXT)
protected: protected:
~ActionGetBadgeTextFunction() override {} ~ActionGetBadgeTextFunction() override = default;
}; };
class ActionSetBadgeTextFunction : public ExtensionActionSetBadgeTextFunction { class ActionSetBadgeTextFunction : public ExtensionActionSetBadgeTextFunction {
@ -249,7 +249,7 @@ class ActionSetBadgeTextFunction : public ExtensionActionSetBadgeTextFunction {
DECLARE_EXTENSION_FUNCTION("action.setBadgeText", ACTION_SETBADGETEXT) DECLARE_EXTENSION_FUNCTION("action.setBadgeText", ACTION_SETBADGETEXT)
protected: protected:
~ActionSetBadgeTextFunction() override {} ~ActionSetBadgeTextFunction() override = default;
}; };
class ActionGetBadgeBackgroundColorFunction class ActionGetBadgeBackgroundColorFunction
@ -259,7 +259,7 @@ class ActionGetBadgeBackgroundColorFunction
ACTION_GETBADGEBACKGROUNDCOLOR) ACTION_GETBADGEBACKGROUNDCOLOR)
protected: protected:
~ActionGetBadgeBackgroundColorFunction() override {} ~ActionGetBadgeBackgroundColorFunction() override = default;
}; };
class ActionSetBadgeBackgroundColorFunction class ActionSetBadgeBackgroundColorFunction
@ -269,7 +269,7 @@ class ActionSetBadgeBackgroundColorFunction
ACTION_SETBADGEBACKGROUNDCOLOR) ACTION_SETBADGEBACKGROUNDCOLOR)
protected: protected:
~ActionSetBadgeBackgroundColorFunction() override {} ~ActionSetBadgeBackgroundColorFunction() override = default;
}; };
class ActionGetBadgeTextColorFunction : public ExtensionActionFunction { class ActionGetBadgeTextColorFunction : public ExtensionActionFunction {
@ -297,7 +297,7 @@ class ActionEnableFunction : public ExtensionActionShowFunction {
DECLARE_EXTENSION_FUNCTION("action.enable", ACTION_ENABLE) DECLARE_EXTENSION_FUNCTION("action.enable", ACTION_ENABLE)
protected: protected:
~ActionEnableFunction() override {} ~ActionEnableFunction() override = default;
}; };
class ActionDisableFunction : public ExtensionActionHideFunction { class ActionDisableFunction : public ExtensionActionHideFunction {
@ -305,7 +305,7 @@ class ActionDisableFunction : public ExtensionActionHideFunction {
DECLARE_EXTENSION_FUNCTION("action.disable", ACTION_DISABLE) DECLARE_EXTENSION_FUNCTION("action.disable", ACTION_DISABLE)
protected: protected:
~ActionDisableFunction() override {} ~ActionDisableFunction() override = default;
}; };
class ActionIsEnabledFunction : public ExtensionActionFunction { class ActionIsEnabledFunction : public ExtensionActionFunction {
@ -350,7 +350,7 @@ class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.setIcon", BROWSERACTION_SETICON) DECLARE_EXTENSION_FUNCTION("browserAction.setIcon", BROWSERACTION_SETICON)
protected: protected:
~BrowserActionSetIconFunction() override {} ~BrowserActionSetIconFunction() override = default;
}; };
class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction { class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
@ -358,7 +358,7 @@ class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.setTitle", BROWSERACTION_SETTITLE) DECLARE_EXTENSION_FUNCTION("browserAction.setTitle", BROWSERACTION_SETTITLE)
protected: protected:
~BrowserActionSetTitleFunction() override {} ~BrowserActionSetTitleFunction() override = default;
}; };
class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction { class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
@ -366,7 +366,7 @@ class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.setPopup", BROWSERACTION_SETPOPUP) DECLARE_EXTENSION_FUNCTION("browserAction.setPopup", BROWSERACTION_SETPOPUP)
protected: protected:
~BrowserActionSetPopupFunction() override {} ~BrowserActionSetPopupFunction() override = default;
}; };
class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction { class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
@ -374,7 +374,7 @@ class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.getTitle", BROWSERACTION_GETTITLE) DECLARE_EXTENSION_FUNCTION("browserAction.getTitle", BROWSERACTION_GETTITLE)
protected: protected:
~BrowserActionGetTitleFunction() override {} ~BrowserActionGetTitleFunction() override = default;
}; };
class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction { class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
@ -382,7 +382,7 @@ class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.getPopup", BROWSERACTION_GETPOPUP) DECLARE_EXTENSION_FUNCTION("browserAction.getPopup", BROWSERACTION_GETPOPUP)
protected: protected:
~BrowserActionGetPopupFunction() override {} ~BrowserActionGetPopupFunction() override = default;
}; };
class BrowserActionSetBadgeTextFunction class BrowserActionSetBadgeTextFunction
@ -392,7 +392,7 @@ class BrowserActionSetBadgeTextFunction
BROWSERACTION_SETBADGETEXT) BROWSERACTION_SETBADGETEXT)
protected: protected:
~BrowserActionSetBadgeTextFunction() override {} ~BrowserActionSetBadgeTextFunction() override = default;
}; };
class BrowserActionSetBadgeBackgroundColorFunction class BrowserActionSetBadgeBackgroundColorFunction
@ -402,7 +402,7 @@ class BrowserActionSetBadgeBackgroundColorFunction
BROWSERACTION_SETBADGEBACKGROUNDCOLOR) BROWSERACTION_SETBADGEBACKGROUNDCOLOR)
protected: protected:
~BrowserActionSetBadgeBackgroundColorFunction() override {} ~BrowserActionSetBadgeBackgroundColorFunction() override = default;
}; };
class BrowserActionGetBadgeTextFunction class BrowserActionGetBadgeTextFunction
@ -412,7 +412,7 @@ class BrowserActionGetBadgeTextFunction
BROWSERACTION_GETBADGETEXT) BROWSERACTION_GETBADGETEXT)
protected: protected:
~BrowserActionGetBadgeTextFunction() override {} ~BrowserActionGetBadgeTextFunction() override = default;
}; };
class BrowserActionGetBadgeBackgroundColorFunction class BrowserActionGetBadgeBackgroundColorFunction
@ -422,7 +422,7 @@ class BrowserActionGetBadgeBackgroundColorFunction
BROWSERACTION_GETBADGEBACKGROUNDCOLOR) BROWSERACTION_GETBADGEBACKGROUNDCOLOR)
protected: protected:
~BrowserActionGetBadgeBackgroundColorFunction() override {} ~BrowserActionGetBadgeBackgroundColorFunction() override = default;
}; };
class BrowserActionEnableFunction : public ExtensionActionShowFunction { class BrowserActionEnableFunction : public ExtensionActionShowFunction {
@ -430,7 +430,7 @@ class BrowserActionEnableFunction : public ExtensionActionShowFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.enable", BROWSERACTION_ENABLE) DECLARE_EXTENSION_FUNCTION("browserAction.enable", BROWSERACTION_ENABLE)
protected: protected:
~BrowserActionEnableFunction() override {} ~BrowserActionEnableFunction() override = default;
}; };
class BrowserActionDisableFunction : public ExtensionActionHideFunction { class BrowserActionDisableFunction : public ExtensionActionHideFunction {
@ -438,7 +438,7 @@ class BrowserActionDisableFunction : public ExtensionActionHideFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE) DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE)
protected: protected:
~BrowserActionDisableFunction() override {} ~BrowserActionDisableFunction() override = default;
}; };
class BrowserActionOpenPopupFunction : public ExtensionActionOpenPopupFunction { class BrowserActionOpenPopupFunction : public ExtensionActionOpenPopupFunction {
@ -447,7 +447,7 @@ class BrowserActionOpenPopupFunction : public ExtensionActionOpenPopupFunction {
BROWSERACTION_OPEN_POPUP) BROWSERACTION_OPEN_POPUP)
protected: protected:
~BrowserActionOpenPopupFunction() override {} ~BrowserActionOpenPopupFunction() override = default;
}; };
} // namespace extensions } // namespace extensions
@ -461,7 +461,7 @@ class PageActionShowFunction : public extensions::ExtensionActionShowFunction {
DECLARE_EXTENSION_FUNCTION("pageAction.show", PAGEACTION_SHOW) DECLARE_EXTENSION_FUNCTION("pageAction.show", PAGEACTION_SHOW)
protected: protected:
~PageActionShowFunction() override {} ~PageActionShowFunction() override = default;
}; };
class PageActionHideFunction : public extensions::ExtensionActionHideFunction { class PageActionHideFunction : public extensions::ExtensionActionHideFunction {
@ -469,7 +469,7 @@ class PageActionHideFunction : public extensions::ExtensionActionHideFunction {
DECLARE_EXTENSION_FUNCTION("pageAction.hide", PAGEACTION_HIDE) DECLARE_EXTENSION_FUNCTION("pageAction.hide", PAGEACTION_HIDE)
protected: protected:
~PageActionHideFunction() override {} ~PageActionHideFunction() override = default;
}; };
class PageActionSetIconFunction class PageActionSetIconFunction
@ -478,7 +478,7 @@ class PageActionSetIconFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setIcon", PAGEACTION_SETICON) DECLARE_EXTENSION_FUNCTION("pageAction.setIcon", PAGEACTION_SETICON)
protected: protected:
~PageActionSetIconFunction() override {} ~PageActionSetIconFunction() override = default;
}; };
class PageActionSetTitleFunction class PageActionSetTitleFunction
@ -487,7 +487,7 @@ class PageActionSetTitleFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setTitle", PAGEACTION_SETTITLE) DECLARE_EXTENSION_FUNCTION("pageAction.setTitle", PAGEACTION_SETTITLE)
protected: protected:
~PageActionSetTitleFunction() override {} ~PageActionSetTitleFunction() override = default;
}; };
class PageActionSetPopupFunction class PageActionSetPopupFunction
@ -496,7 +496,7 @@ class PageActionSetPopupFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setPopup", PAGEACTION_SETPOPUP) DECLARE_EXTENSION_FUNCTION("pageAction.setPopup", PAGEACTION_SETPOPUP)
protected: protected:
~PageActionSetPopupFunction() override {} ~PageActionSetPopupFunction() override = default;
}; };
class PageActionGetTitleFunction class PageActionGetTitleFunction
@ -505,7 +505,7 @@ class PageActionGetTitleFunction
DECLARE_EXTENSION_FUNCTION("pageAction.getTitle", PAGEACTION_GETTITLE) DECLARE_EXTENSION_FUNCTION("pageAction.getTitle", PAGEACTION_GETTITLE)
protected: protected:
~PageActionGetTitleFunction() override {} ~PageActionGetTitleFunction() override = default;
}; };
class PageActionGetPopupFunction class PageActionGetPopupFunction
@ -514,7 +514,7 @@ class PageActionGetPopupFunction
DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP)
protected: protected:
~PageActionGetPopupFunction() override {} ~PageActionGetPopupFunction() override = default;
}; };
#endif // SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ #endif // SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_

View file

@ -42,13 +42,13 @@ class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction {
bool ShouldRemoveCSS() const override; bool ShouldRemoveCSS() const override;
private: private:
~TabsExecuteScriptFunction() override {} ~TabsExecuteScriptFunction() override = default;
DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT)
}; };
class TabsReloadFunction : public ExtensionFunction { class TabsReloadFunction : public ExtensionFunction {
~TabsReloadFunction() override {} ~TabsReloadFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -56,7 +56,7 @@ class TabsReloadFunction : public ExtensionFunction {
}; };
class TabsQueryFunction : public ExtensionFunction { class TabsQueryFunction : public ExtensionFunction {
~TabsQueryFunction() override {} ~TabsQueryFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -64,7 +64,7 @@ class TabsQueryFunction : public ExtensionFunction {
}; };
class TabsGetFunction : public ExtensionFunction { class TabsGetFunction : public ExtensionFunction {
~TabsGetFunction() override {} ~TabsGetFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -73,7 +73,7 @@ class TabsGetFunction : public ExtensionFunction {
class TabsSetZoomFunction : public ExtensionFunction { class TabsSetZoomFunction : public ExtensionFunction {
private: private:
~TabsSetZoomFunction() override {} ~TabsSetZoomFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -82,7 +82,7 @@ class TabsSetZoomFunction : public ExtensionFunction {
class TabsGetZoomFunction : public ExtensionFunction { class TabsGetZoomFunction : public ExtensionFunction {
private: private:
~TabsGetZoomFunction() override {} ~TabsGetZoomFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -91,7 +91,7 @@ class TabsGetZoomFunction : public ExtensionFunction {
class TabsSetZoomSettingsFunction : public ExtensionFunction { class TabsSetZoomSettingsFunction : public ExtensionFunction {
private: private:
~TabsSetZoomSettingsFunction() override {} ~TabsSetZoomSettingsFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -100,7 +100,7 @@ class TabsSetZoomSettingsFunction : public ExtensionFunction {
class TabsGetZoomSettingsFunction : public ExtensionFunction { class TabsGetZoomSettingsFunction : public ExtensionFunction {
private: private:
~TabsGetZoomSettingsFunction() override {} ~TabsGetZoomSettingsFunction() override = default;
ResponseAction Run() override; ResponseAction Run() override;
@ -112,7 +112,7 @@ class TabsUpdateFunction : public ExtensionFunction {
TabsUpdateFunction(); TabsUpdateFunction();
protected: protected:
~TabsUpdateFunction() override {} ~TabsUpdateFunction() override = default;
bool UpdateURL(const std::string& url, int tab_id, std::string* error); bool UpdateURL(const std::string& url, int tab_id, std::string* error);
ResponseValue GetResult(); ResponseValue GetResult();

View file

@ -26,7 +26,7 @@ namespace electron {
class NativeWindowObserver : public base::CheckedObserver { class NativeWindowObserver : public base::CheckedObserver {
public: public:
~NativeWindowObserver() override {} ~NativeWindowObserver() override = default;
// Called when the web page in window wants to create a popup window. // Called when the web page in window wants to create a popup window.
virtual void WillCreatePopupWindow(const std::u16string& frame_name, virtual void WillCreatePopupWindow(const std::u16string& frame_name,

View file

@ -37,7 +37,7 @@ class ElectronMenuModel : public ui::SimpleMenuModel {
class Delegate : public ui::SimpleMenuModel::Delegate { class Delegate : public ui::SimpleMenuModel::Delegate {
public: public:
~Delegate() override {} ~Delegate() override = default;
virtual bool GetAcceleratorForCommandIdWithParams( virtual bool GetAcceleratorForCommandIdWithParams(
int command_id, int command_id,
@ -63,7 +63,7 @@ class ElectronMenuModel : public ui::SimpleMenuModel {
class Observer : public base::CheckedObserver { class Observer : public base::CheckedObserver {
public: public:
~Observer() override {} ~Observer() override = default;
// Notifies the menu will open. // Notifies the menu will open.
virtual void OnMenuWillShow() {} virtual void OnMenuWillShow() {}

View file

@ -14,7 +14,7 @@ namespace electron {
class InspectableWebContentsDelegate { class InspectableWebContentsDelegate {
public: public:
virtual ~InspectableWebContentsDelegate() {} virtual ~InspectableWebContentsDelegate() = default;
// Requested by WebContents of devtools. // Requested by WebContents of devtools.
virtual void DevToolsReloadPage() {} virtual void DevToolsReloadPage() {}

View file

@ -14,7 +14,7 @@ namespace electron {
class InspectableWebContentsViewDelegate { class InspectableWebContentsViewDelegate {
public: public:
virtual ~InspectableWebContentsViewDelegate() {} virtual ~InspectableWebContentsViewDelegate() = default;
virtual void DevToolsFocused() {} virtual void DevToolsFocused() {}
virtual void DevToolsOpened() {} virtual void DevToolsOpened() {}

View file

@ -41,7 +41,7 @@ class TrayIconObserver : public base::CheckedObserver {
virtual void OnMouseMoved(const gfx::Point& location, int modifiers) {} virtual void OnMouseMoved(const gfx::Point& location, int modifiers) {}
protected: protected:
~TrayIconObserver() override {} ~TrayIconObserver() override = default;
}; };
} // namespace electron } // namespace electron

View file

@ -44,7 +44,7 @@ class AutofillPopupChildView : public views::View {
AutofillPopupChildView& operator=(const AutofillPopupChildView&) = delete; AutofillPopupChildView& operator=(const AutofillPopupChildView&) = delete;
private: private:
~AutofillPopupChildView() override {} ~AutofillPopupChildView() override = default;
// views::Views implementation // views::Views implementation
void GetAccessibleNodeData(ui::AXNodeData* node_data) override; void GetAccessibleNodeData(ui::AXNodeData* node_data) override;

View file

@ -20,7 +20,7 @@ class WindowListObserver : public base::CheckedObserver {
virtual void OnWindowAllClosed() {} virtual void OnWindowAllClosed() {}
protected: protected:
~WindowListObserver() override {} ~WindowListObserver() override = default;
}; };
} // namespace electron } // namespace electron

View file

@ -12,7 +12,7 @@
// SkColor is a typedef for uint32_t, this wrapper is to tag an SkColor for // SkColor is a typedef for uint32_t, this wrapper is to tag an SkColor for
// ease of use in gin converters. // ease of use in gin converters.
struct WrappedSkColor { struct WrappedSkColor {
WrappedSkColor() {} WrappedSkColor() = default;
WrappedSkColor(SkColor c) : value(c) {} // NOLINT(runtime/explicit) WrappedSkColor(SkColor c) : value(c) {} // NOLINT(runtime/explicit)
SkColor value; SkColor value;
operator SkColor() const { return value; } operator SkColor() const { return value; }

View file

@ -54,7 +54,7 @@ class EventEmitter : public gin_helper::Wrappable<T> {
EventEmitter& operator=(const EventEmitter&) = delete; EventEmitter& operator=(const EventEmitter&) = delete;
protected: protected:
EventEmitter() {} EventEmitter() = default;
private: private:
// this.emit(name, event, args...); // this.emit(name, event, args...);