refactor: put empty virtual function definitions in header (#43285)

* refactor: in FramelessView, move empty function decls to header

* refactor: in electron::api::WebContents, move empty function decls to header

* refactor: in electron::api::NativeWindow, move empty function decls to header

* refactor: in electron::OffScreenWebContentsView, move empty function decls to header

* refactor: in electron::OffScreenRenderWidgetHostView, move empty function decls to header

* refactor: in auto_updater::AutoUpdater, move empty function decls to header

* refactor: in electorn::api::FrameSubscriber, move empty function decls to header

* refactor: in electorn::api::SimpleURLLoaderWrapper, move empty function decls to header

* refactor: in electorn::InspectableWebContents, move empty function decls to header

* refactor: in electorn::OffScreenVideoConsumer, move empty function decls to header

* refactor: in electron::OffScreenWebContentsView, move empty function decls to header

* refactor: in electron::TrayIcon, move empty function decls to header

* refactor: in electron::ViewsDelegate, move empty function decls to header

* refactor: in electron::MediaCaptureDevicesDispatcher, move empty function decls to header

* refactor: in electron::UsbChooserContext::DeviceObserver, move empty function decls to header

* refactor: in electron::ProxyingWebSocket, move empty function decls to header

* refactor: in electron::Notification, move empty function decls to header

* refactor: in electron::PlatformNotificationService, move empty function decls to header

* Revert "refactor: in electron::PlatformNotificationService, move empty function decls to header"

This reverts commit 9103750d03b9ba1ceccba43d11dfdc2404ff6191.

* refactor: in electron::ElectronPDFDocumentHelperClient, move empty function decls to header

* refactor: in electron::api::SpellCheckClient, move empty function decls to header

* refactor: in electron::ElectronExtensionHostDelegate, move empty function decls to header

* refactor: in electron::PlatformNotificationService, move empty function decls to header

* refactor: in electron::NativeWindowViews, move empty function decls to header

* chore: move SetTouchBar() back to cc

* Revert "refactor: in auto_updater::AutoUpdater, move empty function decls to header"

This reverts commit c43d6862d32c74f63f82700a7546a732ac05ecb8.
This commit is contained in:
Charles Kerr 2024-08-12 02:56:51 -05:00 committed by GitHub
parent bff298987f
commit 23bcca3ffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 107 additions and 370 deletions

View file

@ -43,8 +43,6 @@ void Notification::NotificationFailed(const std::string& error) {
Destroy();
}
void Notification::Remove() {}
void Notification::Destroy() {
if (presenter()) {
presenter()->RemoveNotification(this);

View file

@ -58,7 +58,7 @@ class Notification {
// Removes the notification if it was not fully removed during dismissal,
// as can happen on some platforms including Windows.
virtual void Remove();
virtual void Remove() {}
// Should be called by derived classes.
void NotificationClicked();

View file

@ -114,16 +114,6 @@ void PlatformNotificationService::DisplayNotification(
}
}
void PlatformNotificationService::DisplayPersistentNotification(
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) {}
void PlatformNotificationService::ClosePersistentNotification(
const std::string& notification_id) {}
void PlatformNotificationService::CloseNotification(
const std::string& notification_id) {
auto* presenter = browser_client_->GetNotificationPresenter();

View file

@ -39,8 +39,9 @@ class PlatformNotificationService
const GURL& service_worker_scope,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void ClosePersistentNotification(const std::string& notification_id) override;
const blink::NotificationResources& notification_resources) override {}
void ClosePersistentNotification(
const std::string& notification_id) override {}
void CloseNotification(const std::string& notification_id) override;
void GetDisplayedNotifications(
DisplayedNotificationsCallback callback) override;