diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 96f47b273a1c..3fb082f3aea6 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, - public BrowserObserver, - public content::GpuDataManagerObserver, - public content::BrowserChildProcessObserver { +class App final : public ElectronBrowserClient::Delegate, + public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public BrowserObserver, + public content::GpuDataManagerObserver, + public 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 aadbd7543c26..601b448e88d2 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, - public WindowListObserver { +class AutoUpdater final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public auto_updater::Delegate, + public 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 3dd16e84bc7e..a6e1436d17f6 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 cc3b1b32f63c..2e28383bb826 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 74299619487f..a71c4892bea8 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, - public content::WebContentsObserver { +class Debugger final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public content::DevToolsAgentHostClient, + public 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 4f8bc7771f84..82dc6fe1cbea 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, - public DesktopMediaListObserver { +class DesktopCapturer final : public gin::Wrappable, + public gin_helper::Pinnable, + public 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 906b24155be4..07a34fc47428 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, - public download::DownloadItem::Observer { +class DownloadItem final : public gin::Wrappable, + public gin_helper::Pinnable, + public gin_helper::EventEmitterMixin, + public 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 e5048c1826f9..e173cedc9a7c 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 : public extensions::GlobalShortcutListener::Observer, - public gin::Wrappable { +class GlobalShortcut final + : public 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 4b646410545d..123cc6b1c9a4 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, - public in_app_purchase::TransactionObserver { +class InAppPurchase final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public 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 ecf5edbb929f..474daf583a11 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, - public ui::NativeThemeObserver { +class NativeTheme final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public 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 3a745ca69519..aade7f02cdc4 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 123834eb1ab2..c74a15921f8f 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 01f3aced32f4..be3b823851b6 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, - public base::PowerStateObserver, - public base::PowerSuspendObserver, - public base::PowerThermalObserver { +class PowerMonitor final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Pinnable, + public base::PowerStateObserver, + public base::PowerSuspendObserver, + public 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 349aaf18d75c..e7acdf3aa142 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 7db7b66c3ce1..1d0ac4d89047 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 19f29d83d5dd..4fad9d233ede 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 941a473a66e7..cc5aa794b1e7 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, - public display::DisplayObserver { +class Screen final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public 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 9a6a6cd67162..7f4361ce13f9 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, public content::ServiceWorkerContextObserver { diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index e9ef22107312..b18bedad008b 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) - public SpellcheckHunspellDictionary::Observer, + public SpellcheckHunspellDictionary::Observer, #endif #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) - public extensions::ExtensionRegistryObserver, + public extensions::ExtensionRegistryObserver, #endif - public content::DownloadManager::Observer { + public 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 03db491df699..17d6ed6105b4 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 26429e9ee823..de639856dbcf 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, - public TrayIconObserver { +class Tray final : public gin::Wrappable, + public gin_helper::EventEmitterMixin, + public gin_helper::Constructible, + public gin_helper::CleanedUpAtExit, + public gin_helper::Pinnable, + public 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 b57dca1677be..55676a3873bc 100644 --- a/shell/browser/api/electron_api_utility_process.h +++ b/shell/browser/api/electron_api_utility_process.h @@ -36,7 +36,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 bc7c1b61ce33..f66c6d2fefe9 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1896,7 +1896,7 @@ void WebContents::OnFirstNonEmptyLayout( // 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 4ee19ca9ce55..e9f060f8f491 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, - public 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, + public 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 ddf7bdd63096..c82d9be2e7ba 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 64444585358b..33db39bf9f53 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 9239db2aa522..b952495b25be 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 6087eb203374..6f2e62385d50 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 5f622845f98a..dfc8653ddc32 100644 --- a/shell/common/api/electron_api_url_loader.cc +++ b/shell/common/api/electron_api_url_loader.cc @@ -160,8 +160,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 b0da4a727ba3..53f6706f6591 100644 --- a/shell/common/api/electron_api_url_loader.h +++ b/shell/common/api/electron_api_url_loader.h @@ -43,7 +43,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, public network::SimpleURLLoaderStreamConsumer, diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 69693bdafa6e..c134c7f6bac4 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, return true; } -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 a1565ffb7d5f..ea41196a575d 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 317b93368749..06d7c8cb2acc 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, - public content::RenderFrameObserver { +class IPCRenderer final : public gin::Wrappable, + public 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 ceb5608ab7dd..6adfc5b24ab9 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -329,8 +329,8 @@ class SpellCheckerHolder final : public content::RenderFrameObserver { } // namespace -class WebFrameRenderer : public gin::Wrappable, - public content::RenderFrameObserver { +class WebFrameRenderer final : public gin::Wrappable, + public content::RenderFrameObserver { public: static gin::WrapperInfo kWrapperInfo; diff --git a/shell/services/node/parent_port.h b/shell/services/node/parent_port.h index bb5688657393..e517dfa7e956 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);