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

Unified Diff: content/renderer/notification_permission_dispatcher.h

Issue 1471833002: Stop using base::IDMap in the NotificationPermissionDispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/notification_permission_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/notification_permission_dispatcher.h
diff --git a/content/renderer/notification_permission_dispatcher.h b/content/renderer/notification_permission_dispatcher.h
index 5c32693b18a7295e3a1fb12cbd14f7b3b9efddcd..bb3430fe1f52aa409bde5abb16bff774d0bda318 100644
--- a/content/renderer/notification_permission_dispatcher.h
+++ b/content/renderer/notification_permission_dispatcher.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
#define CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
-#include "base/id_map.h"
+#include "base/memory/scoped_ptr.h"
#include "content/common/permission_service.mojom.h"
#include "content/public/renderer/render_frame_observer.h"
@@ -16,6 +16,8 @@ class WebSecurityOrigin;
namespace content {
+class RenderFrame;
+
// Dispatcher for Web Notification permission requests.
class NotificationPermissionDispatcher : public RenderFrameObserver {
public:
@@ -25,18 +27,13 @@ class NotificationPermissionDispatcher : public RenderFrameObserver {
// Requests permission to display Web Notifications for |origin|. The callback
// will be invoked when the permission status is available. This class will
// take ownership of |callback|.
- void RequestPermission(
- const blink::WebSecurityOrigin& origin,
- blink::WebNotificationPermissionCallback* callback);
+ void RequestPermission(const blink::WebSecurityOrigin& origin,
+ blink::WebNotificationPermissionCallback* callback);
private:
void OnPermissionRequestComplete(
- int request_id, PermissionStatus status);
-
- // Tracks the active notification permission requests. This class takes
- // ownership of the created WebNotificationPermissionCallback objects.
- IDMap<blink::WebNotificationPermissionCallback, IDMapOwnPointer>
- pending_requests_;
+ scoped_ptr<blink::WebNotificationPermissionCallback> callback,
+ PermissionStatus status);
PermissionServicePtr permission_service_;
« no previous file with comments | « no previous file | content/renderer/notification_permission_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698