Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: content/renderer/notification_permission_dispatcher.cc

Issue 2255933002: Add PermissionDescriptor to the permissions Mojo interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_notification_dispatcher
Patch Set: Demonstrate PermissionDescriptor extensibility with MIDI. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/notification_permission_dispatcher.cc
diff --git a/content/renderer/notification_permission_dispatcher.cc b/content/renderer/notification_permission_dispatcher.cc
index b94f5f3217fa972e1f93bca07e001a80f61bb492..6e9fa83a8e42bbec30de37e905711dd6396fa63c 100644
--- a/content/renderer/notification_permission_dispatcher.cc
+++ b/content/renderer/notification_permission_dispatcher.cc
@@ -34,10 +34,13 @@ void NotificationPermissionDispatcher::RequestPermission(
std::unique_ptr<WebNotificationPermissionCallback> owned_callback(callback);
+ auto descriptor = blink::mojom::PermissionDescriptor::New();
+ descriptor->name = blink::mojom::PermissionName::NOTIFICATIONS;
ddorwin 2016/08/24 02:43:55 This pattern occurs frequently. ISTM, the construc
+
// base::Unretained is safe here because the Mojo channel, with associated
// callbacks, will be deleted before the "this" instance is deleted.
permission_service_->RequestPermission(
- blink::mojom::PermissionName::NOTIFICATIONS, origin,
+ std::move(descriptor), origin,
blink::WebUserGestureIndicator::isProcessingUserGesture(),
base::Bind(&NotificationPermissionDispatcher::OnPermissionRequestComplete,
base::Unretained(this),

Powered by Google App Engine
This is Rietveld 408576698