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

Side by Side Diff: content/renderer/notification_permission_dispatcher.h

Issue 1771743002: Move geolocation and permission mojoms into WebKit/public/platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
6 #define CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/permission_service.mojom.h"
11 #include "content/public/renderer/render_frame_observer.h" 10 #include "content/public/renderer/render_frame_observer.h"
11 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m.h"
12 12
13 namespace blink { 13 namespace blink {
14 class WebNotificationPermissionCallback; 14 class WebNotificationPermissionCallback;
15 class WebSecurityOrigin; 15 class WebSecurityOrigin;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 19
20 class RenderFrame; 20 class RenderFrame;
21 21
22 // Dispatcher for Web Notification permission requests. 22 // Dispatcher for Web Notification permission requests.
23 class NotificationPermissionDispatcher : public RenderFrameObserver { 23 class NotificationPermissionDispatcher : public RenderFrameObserver {
24 public: 24 public:
25 explicit NotificationPermissionDispatcher(RenderFrame* render_frame); 25 explicit NotificationPermissionDispatcher(RenderFrame* render_frame);
26 ~NotificationPermissionDispatcher() override; 26 ~NotificationPermissionDispatcher() override;
27 27
28 // Requests permission to display Web Notifications for |origin|. The callback 28 // Requests permission to display Web Notifications for |origin|. The callback
29 // will be invoked when the permission status is available. This class will 29 // will be invoked when the permission status is available. This class will
30 // take ownership of |callback|. 30 // take ownership of |callback|.
31 void RequestPermission(const blink::WebSecurityOrigin& origin, 31 void RequestPermission(const blink::WebSecurityOrigin& origin,
32 blink::WebNotificationPermissionCallback* callback); 32 blink::WebNotificationPermissionCallback* callback);
33 33
34 private: 34 private:
35 void OnPermissionRequestComplete( 35 void OnPermissionRequestComplete(
36 scoped_ptr<blink::WebNotificationPermissionCallback> callback, 36 scoped_ptr<blink::WebNotificationPermissionCallback> callback,
37 mojom::PermissionStatus status); 37 blink::mojom::PermissionStatus status);
38 38
39 mojom::PermissionServicePtr permission_service_; 39 blink::mojom::PermissionServicePtr permission_service_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(NotificationPermissionDispatcher); 41 DISALLOW_COPY_AND_ASSIGN(NotificationPermissionDispatcher);
42 }; 42 };
43 43
44 } // namespace content 44 } // namespace content
45 45
46 #endif // CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_ 46 #endif // CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/midi_dispatcher.cc ('k') | content/renderer/notification_permission_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698