From d13e3324c6eac86a26788e533af27c39f4fe39e9 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 2 Oct 2018 13:05:57 -0700 Subject: [PATCH] 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 --- .../browser/platform_notification_service.cc | 20 +------------------ .../browser/platform_notification_service.h | 8 -------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/brightray/browser/platform_notification_service.cc b/brightray/browser/platform_notification_service.cc index b1ce2d6cde05..630dbe0ad02c 100644 --- a/brightray/browser/platform_notification_service.cc +++ b/brightray/browser/platform_notification_service.cc @@ -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, diff --git a/brightray/browser/platform_notification_service.h b/brightray/browser/platform_notification_service.h index b200fbed8eb3..7043a88aa509 100644 --- a/brightray/browser/platform_notification_service.h +++ b/brightray/browser/platform_notification_service.h @@ -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,