9d0e6d09f0
* chore: bump chromium in DEPS to 119.0.6036.0 * chore: bump chromium in DEPS to 119.0.6037.0 * chore: bump chromium in DEPS to 119.0.6039.0 * chore: bump chromium in DEPS to 119.0.6041.0 * chore: update chromium patches * 4765230: Move //content/browser/renderer_host/event_with_latency_info.h to //content/common/input | https://chromium-review.googlesource.com/c/chromium/src/+/4765230 * 4890325: ScopedRunLoopTimeout: add custom timeout callback handler for testing | https://chromium-review.googlesource.com/c/chromium/src/+/4890325 * chore: update all patches * chore: bump chromium in DEPS to 119.0.6043.0 * 4898682: [api] Add Error.cause to V8 API https://chromium-review.googlesource.com/c/v8/v8/+/4898682 * 4837192: Plumb origin through for drags. https://chromium-review.googlesource.com/c/chromium/src/+/4837192 * Prevent content analysis on web pages that don't accept drag and drop. https://chromium-review.googlesource.com/c/chromium/src/+/4814086 * Make getting displayed notifications work with notification attribution. https://chromium-review.googlesource.com/c/chromium/src/+/4738935 * 4898682: [api] Add Error.cause to V8 API https://chromium-review.googlesource.com/c/v8/v8/+/4898682 * lib,test: do not hardcode Buffer.kMaxLength https://github.com/nodejs/node/pull/49876 * chore: remove Goma warning from mksnapshot_args * 4776412: Remove Windows-specific wstring variants of StringPrintf() etc. https://chromium-review.googlesource.com/c/chromium/src/+/4776412 * [dPWA] Prevent WebAppInstallInfo from being included on Android https://chromium-review.googlesource.com/c/chromium/src/+/4886594 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
62 lines
2.3 KiB
C++
62 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_
|