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:
Jeremy Apthorp 2018-10-02 13:05:57 -07:00
parent 2a3a845262
commit d13e3324c6
2 changed files with 1 additions and 27 deletions

View file

@ -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,

View file

@ -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,