electron/shell/browser/notifications/platform_notification_service.h
Charles Kerr 23bcca3ffc
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.
2024-08-12 09:56:51 +02:00

63 lines
2.3 KiB
C++

// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_
#include <string>
#include "base/memory/raw_ptr.h"
#include "content/public/browser/platform_notification_service.h"
namespace electron {
class ElectronBrowserClient;
class PlatformNotificationService
: public content::PlatformNotificationService {
public:
explicit PlatformNotificationService(ElectronBrowserClient* browser_client);
~PlatformNotificationService() override;
// disable copy
PlatformNotificationService(const PlatformNotificationService&) = delete;
PlatformNotificationService& operator=(const PlatformNotificationService&) =
delete;
protected:
// content::PlatformNotificationService:
void DisplayNotification(
content::RenderFrameHost* render_frame_host,
const std::string& notification_id,
const GURL& origin,
const GURL& document_url,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void DisplayPersistentNotification(
const std::string& notification_id,
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 {}
void CloseNotification(const std::string& notification_id) override;
void GetDisplayedNotifications(
DisplayedNotificationsCallback callback) override;
void GetDisplayedNotificationsForOrigin(
const GURL& origin,
DisplayedNotificationsCallback callback) override;
int64_t ReadNextPersistentNotificationId() override;
void RecordNotificationUkmEvent(
const content::NotificationDatabaseData& data) override;
void ScheduleTrigger(base::Time timestamp) override;
base::Time ReadNextTriggerTimestamp() override;
private:
raw_ptr<ElectronBrowserClient> browser_client_;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_