diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 10bb09985ec..cabb18a9a51 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -47,12 +47,12 @@ enum class JumpListResult : int; namespace api { -class App : public ElectronBrowserClient::Delegate, - public gin::Wrappable, - public gin_helper::EventEmitterMixin, - private BrowserObserver, - private content::GpuDataManagerObserver, - private content::BrowserChildProcessObserver { +class App final : public ElectronBrowserClient::Delegate, + public gin::Wrappable, + public gin_helper::EventEmitterMixin, + private BrowserObserver, + private content::GpuDataManagerObserver, + private content::BrowserChildProcessObserver { public: using FileIconCallback = base::RepeatingCallback, const gfx::Image&)>; diff --git a/shell/browser/api/electron_api_auto_updater.h b/shell/browser/api/electron_api_auto_updater.h index 50c771fddbb..71cf715e602 100644 --- a/shell/browser/api/electron_api_auto_updater.h +++ b/shell/browser/api/electron_api_auto_updater.h @@ -15,10 +15,10 @@ namespace electron::api { -class AutoUpdater : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public auto_updater::Delegate, - private WindowListObserver { +class AutoUpdater final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public auto_updater::Delegate, + private WindowListObserver { public: static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index 3dd16e84bc7..a6e1436d17f 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -27,8 +27,8 @@ class ElectronBrowserContext; namespace api { -class Cookies : public gin::Wrappable, - public gin_helper::EventEmitterMixin { +class Cookies final : public gin::Wrappable, + public gin_helper::EventEmitterMixin { public: static gin::Handle Create(v8::Isolate* isolate, ElectronBrowserContext* browser_context); diff --git a/shell/browser/api/electron_api_data_pipe_holder.h b/shell/browser/api/electron_api_data_pipe_holder.h index cc3b1b32f63..2e28383bb82 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.h +++ b/shell/browser/api/electron_api_data_pipe_holder.h @@ -16,7 +16,7 @@ namespace electron::api { // Retains reference to the data pipe. -class DataPipeHolder : public gin::Wrappable { +class DataPipeHolder final : public gin::Wrappable { public: // gin::Wrappable static gin::WrapperInfo kWrapperInfo; diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index deda78c6cd2..a74703184c6 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -25,10 +25,10 @@ class WebContents; namespace electron::api { -class Debugger : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public content::DevToolsAgentHostClient, - private content::WebContentsObserver { +class Debugger final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public content::DevToolsAgentHostClient, + private content::WebContentsObserver { public: static gin::Handle Create(v8::Isolate* isolate, content::WebContents* web_contents); diff --git a/shell/browser/api/electron_api_desktop_capturer.h b/shell/browser/api/electron_api_desktop_capturer.h index 74a9637fad7..d21f782a8ae 100644 --- a/shell/browser/api/electron_api_desktop_capturer.h +++ b/shell/browser/api/electron_api_desktop_capturer.h @@ -17,9 +17,9 @@ namespace electron::api { -class DesktopCapturer : public gin::Wrappable, - public gin_helper::Pinnable, - private DesktopMediaListObserver { +class DesktopCapturer final : public gin::Wrappable, + public gin_helper::Pinnable, + private DesktopMediaListObserver { public: struct Source { DesktopMediaList::Source media_list_source; diff --git a/shell/browser/api/electron_api_download_item.h b/shell/browser/api/electron_api_download_item.h index b909386c2f4..c842731c4e7 100644 --- a/shell/browser/api/electron_api_download_item.h +++ b/shell/browser/api/electron_api_download_item.h @@ -21,10 +21,10 @@ class GURL; namespace electron::api { -class DownloadItem : public gin::Wrappable, - public gin_helper::Pinnable, - public gin_helper::EventEmitterMixin, - private download::DownloadItem::Observer { +class DownloadItem final : public gin::Wrappable, + public gin_helper::Pinnable, + public gin_helper::EventEmitterMixin, + private download::DownloadItem::Observer { public: static gin::Handle FromOrCreate(v8::Isolate* isolate, download::DownloadItem* item); diff --git a/shell/browser/api/electron_api_global_shortcut.h b/shell/browser/api/electron_api_global_shortcut.h index b89b8bd4adc..08304358e99 100644 --- a/shell/browser/api/electron_api_global_shortcut.h +++ b/shell/browser/api/electron_api_global_shortcut.h @@ -16,8 +16,9 @@ namespace electron::api { -class GlobalShortcut : private extensions::GlobalShortcutListener::Observer, - public gin::Wrappable { +class GlobalShortcut final + : private extensions::GlobalShortcutListener::Observer, + public gin::Wrappable { public: static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_in_app_purchase.h b/shell/browser/api/electron_api_in_app_purchase.h index e89a7ca691b..744001542ff 100644 --- a/shell/browser/api/electron_api_in_app_purchase.h +++ b/shell/browser/api/electron_api_in_app_purchase.h @@ -18,9 +18,9 @@ namespace electron::api { -class InAppPurchase : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - private in_app_purchase::TransactionObserver { +class InAppPurchase final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + private in_app_purchase::TransactionObserver { public: static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_native_theme.h b/shell/browser/api/electron_api_native_theme.h index 51db378549d..5f4c7824b74 100644 --- a/shell/browser/api/electron_api_native_theme.h +++ b/shell/browser/api/electron_api_native_theme.h @@ -14,9 +14,9 @@ namespace electron::api { -class NativeTheme : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - private ui::NativeThemeObserver { +class NativeTheme final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + private ui::NativeThemeObserver { public: static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index 3a745ca6951..aade7f02cdc 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -30,7 +30,7 @@ class ElectronBrowserContext; namespace api { // The code is referenced from the net_log::NetExportFileWriter class. -class NetLog : public gin::Wrappable { +class NetLog final : public gin::Wrappable { public: static gin::Handle Create(v8::Isolate* isolate, ElectronBrowserContext* browser_context); diff --git a/shell/browser/api/electron_api_notification.h b/shell/browser/api/electron_api_notification.h index 123834eb1ab..c74a15921f8 100644 --- a/shell/browser/api/electron_api_notification.h +++ b/shell/browser/api/electron_api_notification.h @@ -28,11 +28,11 @@ class Handle; namespace electron::api { -class Notification : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public gin_helper::Constructible, - public gin_helper::CleanedUpAtExit, - public NotificationDelegate { +class Notification final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Constructible, + public gin_helper::CleanedUpAtExit, + public NotificationDelegate { public: static bool IsSupported(); diff --git a/shell/browser/api/electron_api_power_monitor.h b/shell/browser/api/electron_api_power_monitor.h index 436fd9c0f87..d0dd651f01c 100644 --- a/shell/browser/api/electron_api_power_monitor.h +++ b/shell/browser/api/electron_api_power_monitor.h @@ -17,12 +17,12 @@ namespace electron::api { -class PowerMonitor : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public gin_helper::Pinnable, - private base::PowerStateObserver, - private base::PowerSuspendObserver, - private base::PowerThermalObserver { +class PowerMonitor final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Pinnable, + private base::PowerStateObserver, + private base::PowerSuspendObserver, + private base::PowerThermalObserver { public: static v8::Local Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_power_save_blocker.h b/shell/browser/api/electron_api_power_save_blocker.h index 349aaf18d75..e7acdf3aa14 100644 --- a/shell/browser/api/electron_api_power_save_blocker.h +++ b/shell/browser/api/electron_api_power_save_blocker.h @@ -14,7 +14,7 @@ namespace electron::api { -class PowerSaveBlocker : public gin::Wrappable { +class PowerSaveBlocker final : public gin::Wrappable { public: static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_protocol.h b/shell/browser/api/electron_api_protocol.h index 7db7b66c3ce..1d0ac4d8904 100644 --- a/shell/browser/api/electron_api_protocol.h +++ b/shell/browser/api/electron_api_protocol.h @@ -40,8 +40,8 @@ enum class ProtocolError { }; // Protocol implementation based on network services. -class Protocol : public gin::Wrappable, - public gin_helper::Constructible { +class Protocol final : public gin::Wrappable, + public gin_helper::Constructible { public: static gin::Handle Create(v8::Isolate* isolate, ElectronBrowserContext* browser_context); diff --git a/shell/browser/api/electron_api_push_notifications.h b/shell/browser/api/electron_api_push_notifications.h index 6f1e9f1215b..ffaa2a896aa 100644 --- a/shell/browser/api/electron_api_push_notifications.h +++ b/shell/browser/api/electron_api_push_notifications.h @@ -17,7 +17,7 @@ namespace electron::api { -class PushNotifications +class PushNotifications final : public ElectronBrowserClient::Delegate, public gin::Wrappable, public gin_helper::EventEmitterMixin, diff --git a/shell/browser/api/electron_api_screen.h b/shell/browser/api/electron_api_screen.h index c94d0f62b96..40450ee3076 100644 --- a/shell/browser/api/electron_api_screen.h +++ b/shell/browser/api/electron_api_screen.h @@ -22,9 +22,9 @@ class Screen; namespace electron::api { -class Screen : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - private display::DisplayObserver { +class Screen final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + private display::DisplayObserver { public: static v8::Local Create(gin_helper::ErrorThrower error_thrower); diff --git a/shell/browser/api/electron_api_service_worker_context.h b/shell/browser/api/electron_api_service_worker_context.h index 52f617e59e0..212df07fa1c 100644 --- a/shell/browser/api/electron_api_service_worker_context.h +++ b/shell/browser/api/electron_api_service_worker_context.h @@ -18,7 +18,7 @@ class ElectronBrowserContext; namespace api { -class ServiceWorkerContext +class ServiceWorkerContext final : public gin::Wrappable, public gin_helper::EventEmitterMixin, private content::ServiceWorkerContextObserver { diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index f4154eb1f64..8f5f0ef2c31 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -60,18 +60,18 @@ class ElectronBrowserContext; namespace api { -class Session : public gin::Wrappable, - public gin_helper::Pinnable, - public gin_helper::Constructible, - public gin_helper::EventEmitterMixin, - public gin_helper::CleanedUpAtExit, +class Session final : public gin::Wrappable, + public gin_helper::Pinnable, + public gin_helper::Constructible, + public gin_helper::EventEmitterMixin, + public gin_helper::CleanedUpAtExit, #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) - private SpellcheckHunspellDictionary::Observer, + private SpellcheckHunspellDictionary::Observer, #endif #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) - private extensions::ExtensionRegistryObserver, + private extensions::ExtensionRegistryObserver, #endif - private content::DownloadManager::Observer { + private content::DownloadManager::Observer { public: // Gets or creates Session from the |browser_context|. static gin::Handle CreateFrom( diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index 03db491df69..17d6ed6105b 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -31,7 +31,7 @@ enum class NotificationCenterKind { }; #endif -class SystemPreferences +class SystemPreferences final : public gin::Wrappable, public gin_helper::EventEmitterMixin #if BUILDFLAG(IS_WIN) diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index 9eaebb50666..dabd531489b 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/shell/browser/api/electron_api_tray.h @@ -34,12 +34,12 @@ namespace electron::api { class Menu; -class Tray : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public gin_helper::Constructible, - public gin_helper::CleanedUpAtExit, - public gin_helper::Pinnable, - private TrayIconObserver { +class Tray final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Constructible, + public gin_helper::CleanedUpAtExit, + public gin_helper::Pinnable, + private TrayIconObserver { public: // gin_helper::Constructible static gin::Handle New(gin_helper::ErrorThrower thrower, diff --git a/shell/browser/api/electron_api_utility_process.h b/shell/browser/api/electron_api_utility_process.h index b11bb2d6683..29b6d26a2fd 100644 --- a/shell/browser/api/electron_api_utility_process.h +++ b/shell/browser/api/electron_api_utility_process.h @@ -37,7 +37,7 @@ class Process; namespace electron::api { -class UtilityProcessWrapper +class UtilityProcessWrapper final : public gin::Wrappable, public gin_helper::Pinnable, public gin_helper::EventEmitterMixin, diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index f7b99732562..d284b447671 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1898,7 +1898,7 @@ namespace { // This object wraps the InvokeCallback so that if it gets GC'd by V8, we can // still call the callback and send an error. Not doing so causes a Mojo DCHECK, // since Mojo requires callbacks to be called before they are destroyed. -class ReplyChannel : public gin::Wrappable { +class ReplyChannel final : public gin::Wrappable { public: using InvokeCallback = electron::mojom::ElectronApiIPC::InvokeCallback; static gin::Handle Create(v8::Isolate* isolate, diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index f0054b7ae6a..3ec8c6fe58c 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -103,19 +103,19 @@ namespace api { class BaseWindow; // Wrapper around the content::WebContents. -class WebContents : public ExclusiveAccessContext, - public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public gin_helper::Constructible, - public gin_helper::Pinnable, - public gin_helper::CleanedUpAtExit, - public content::WebContentsObserver, - public content::WebContentsDelegate, - private content::RenderWidgetHost::InputEventObserver, - public content::JavaScriptDialogManager, - public InspectableWebContentsDelegate, - public InspectableWebContentsViewDelegate, - public BackgroundThrottlingSource { +class WebContents final : public ExclusiveAccessContext, + public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Constructible, + public gin_helper::Pinnable, + public gin_helper::CleanedUpAtExit, + public content::WebContentsObserver, + public content::WebContentsDelegate, + private content::RenderWidgetHost::InputEventObserver, + public content::JavaScriptDialogManager, + public InspectableWebContentsDelegate, + public InspectableWebContentsViewDelegate, + public BackgroundThrottlingSource { public: enum class Type { kBackgroundPage, // An extension background page. diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index ddf7bdd6309..c82d9be2e7b 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -35,10 +35,10 @@ namespace electron::api { class WebContents; // Bindings for accessing frames from the main process. -class WebFrameMain : public gin::Wrappable, - public gin_helper::EventEmitterMixin, - public gin_helper::Pinnable, - public gin_helper::Constructible { +class WebFrameMain final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Pinnable, + public gin_helper::Constructible { public: // Create a new WebFrameMain and return the V8 wrapper of it. static gin::Handle New(v8::Isolate* isolate); diff --git a/shell/browser/api/electron_api_web_request.h b/shell/browser/api/electron_api_web_request.h index 64444585358..33db39bf9f5 100644 --- a/shell/browser/api/electron_api_web_request.h +++ b/shell/browser/api/electron_api_web_request.h @@ -22,7 +22,8 @@ class BrowserContext; namespace electron::api { -class WebRequest : public gin::Wrappable, public WebRequestAPI { +class WebRequest final : public gin::Wrappable, + public WebRequestAPI { public: // Return the WebRequest object attached to |browser_context|, create if there // is no one. diff --git a/shell/browser/api/message_port.h b/shell/browser/api/message_port.h index 9239db2aa52..b952495b25b 100644 --- a/shell/browser/api/message_port.h +++ b/shell/browser/api/message_port.h @@ -24,9 +24,9 @@ class Handle; namespace electron { // A non-blink version of blink::MessagePort. -class MessagePort : public gin::Wrappable, - public gin_helper::CleanedUpAtExit, - public mojo::MessageReceiver { +class MessagePort final : public gin::Wrappable, + public gin_helper::CleanedUpAtExit, + public mojo::MessageReceiver { public: ~MessagePort() override; static gin::Handle Create(v8::Isolate* isolate); diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index 6087eb20337..6f2e62385d5 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -43,7 +43,7 @@ class Arguments; namespace electron::api { -class NativeImage : public gin::Wrappable { +class NativeImage final : public gin::Wrappable { public: NativeImage(v8::Isolate* isolate, const gfx::Image& image); #if BUILDFLAG(IS_WIN) diff --git a/shell/common/api/electron_api_url_loader.cc b/shell/common/api/electron_api_url_loader.cc index fcfd61322d9..c8f40e45a32 100644 --- a/shell/common/api/electron_api_url_loader.cc +++ b/shell/common/api/electron_api_url_loader.cc @@ -161,8 +161,9 @@ class BufferDataSource : public mojo::DataPipeProducer::DataSource { std::vector buffer_; }; -class JSChunkedDataPipeGetter : public gin::Wrappable, - public network::mojom::ChunkedDataPipeGetter { +class JSChunkedDataPipeGetter final + : public gin::Wrappable, + public network::mojom::ChunkedDataPipeGetter { public: static gin::Handle Create( v8::Isolate* isolate, diff --git a/shell/common/api/electron_api_url_loader.h b/shell/common/api/electron_api_url_loader.h index 86ce37c7012..eae61f6495e 100644 --- a/shell/common/api/electron_api_url_loader.h +++ b/shell/common/api/electron_api_url_loader.h @@ -44,7 +44,7 @@ class ElectronBrowserContext; namespace electron::api { /** Wraps a SimpleURLLoader to make it usable from JavaScript */ -class SimpleURLLoaderWrapper +class SimpleURLLoaderWrapper final : public gin::Wrappable, public gin_helper::EventEmitterMixin, private network::SimpleURLLoaderStreamConsumer, diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 3d01c06c32e..7b4c01432ae 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -252,7 +252,7 @@ bool Converter::FromV8(v8::Isolate* isolate, namespace { -class ChunkedDataPipeReadableStream +class ChunkedDataPipeReadableStream final : public gin::Wrappable { public: static gin::Handle Create( diff --git a/shell/common/gin_helper/event.h b/shell/common/gin_helper/event.h index a1565ffb7d5..ea41196a575 100644 --- a/shell/common/gin_helper/event.h +++ b/shell/common/gin_helper/event.h @@ -19,8 +19,8 @@ class ObjectTemplate; namespace gin_helper::internal { -class Event : public gin::Wrappable, - public gin_helper::Constructible { +class Event final : public gin::Wrappable, + public gin_helper::Constructible { public: // gin_helper::Constructible static gin::Handle New(v8::Isolate* isolate); diff --git a/shell/renderer/api/electron_api_ipc_renderer.cc b/shell/renderer/api/electron_api_ipc_renderer.cc index 7eceed45bd9..1e0d40b57e8 100644 --- a/shell/renderer/api/electron_api_ipc_renderer.cc +++ b/shell/renderer/api/electron_api_ipc_renderer.cc @@ -41,8 +41,8 @@ RenderFrame* GetCurrentRenderFrame() { return RenderFrame::FromWebFrame(frame); } -class IPCRenderer : public gin::Wrappable, - private content::RenderFrameObserver { +class IPCRenderer final : public gin::Wrappable, + private content::RenderFrameObserver { public: static gin::WrapperInfo kWrapperInfo; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 062d33ea3a0..51fecfe00d6 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -327,8 +327,8 @@ class SpellCheckerHolder final : private content::RenderFrameObserver { std::unique_ptr spell_check_client_; }; -class WebFrameRenderer : public gin::Wrappable, - private content::RenderFrameObserver { +class WebFrameRenderer final : public gin::Wrappable, + private content::RenderFrameObserver { public: static gin::WrapperInfo kWrapperInfo; diff --git a/shell/services/node/parent_port.h b/shell/services/node/parent_port.h index bb568865739..e517dfa7e95 100644 --- a/shell/services/node/parent_port.h +++ b/shell/services/node/parent_port.h @@ -30,8 +30,8 @@ namespace electron { // There is only a single instance of this class // for the lifetime of a Utility Process which // also means that GC lifecycle is ignored by this class. -class ParentPort : public gin::Wrappable, - public mojo::MessageReceiver { +class ParentPort final : public gin::Wrappable, + public mojo::MessageReceiver { public: static ParentPort* GetInstance(); static gin::Handle Create(v8::Isolate* isolate);