mirror of
https://github.com/electron/electron.git
synced 2026-02-03 19:55:43 -05:00
Unify notification-related permission checks in its PermissionContext
https://chromium-review.googlesource.com/c/chromium/src/+/1085568 https://chromium-review.googlesource.com/c/chromium/src/+/1085466
This commit is contained in:
@@ -49,7 +49,7 @@ class NotificationDelegateImpl final : public brightray::NotificationDelegate {
|
||||
|
||||
void NotificationClick() override {
|
||||
content::NotificationEventDispatcher::GetInstance()
|
||||
->DispatchNonPersistentClickEvent(notification_id_);
|
||||
->DispatchNonPersistentClickEvent(notification_id_, base::DoNothing());
|
||||
}
|
||||
|
||||
void NotificationClosed() override {
|
||||
@@ -76,24 +76,6 @@ PlatformNotificationService::PlatformNotificationService(
|
||||
|
||||
PlatformNotificationService::~PlatformNotificationService() {}
|
||||
|
||||
blink::mojom::PermissionStatus
|
||||
PlatformNotificationService::CheckPermissionOnUIThread(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) {
|
||||
render_process_id_ = render_process_id;
|
||||
return blink::mojom::PermissionStatus::GRANTED;
|
||||
}
|
||||
|
||||
blink::mojom::PermissionStatus
|
||||
PlatformNotificationService::CheckPermissionOnIOThread(
|
||||
content::ResourceContext* resource_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) {
|
||||
render_process_id_ = render_process_id;
|
||||
return blink::mojom::PermissionStatus::GRANTED;
|
||||
}
|
||||
|
||||
void PlatformNotificationService::DisplayNotification(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::string& notification_id,
|
||||
|
||||
@@ -23,14 +23,6 @@ class PlatformNotificationService
|
||||
|
||||
protected:
|
||||
// content::PlatformNotificationService:
|
||||
blink::mojom::PermissionStatus CheckPermissionOnUIThread(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) override;
|
||||
blink::mojom::PermissionStatus CheckPermissionOnIOThread(
|
||||
content::ResourceContext* resource_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) override;
|
||||
void DisplayNotification(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::string& notification_id,
|
||||
|
||||
Reference in New Issue
Block a user