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

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

Issue 2258673002: Revert of Remove content::NotificationPermissionDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissions_typemaps
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/notification_permission_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
6 #define CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "content/public/renderer/render_frame_observer.h"
12 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m.h"
13
14 namespace blink {
15 class WebNotificationPermissionCallback;
16 class WebSecurityOrigin;
17 }
18
19 namespace content {
20
21 class RenderFrame;
22
23 // Dispatcher for Web Notification permission requests.
24 class NotificationPermissionDispatcher : public RenderFrameObserver {
25 public:
26 explicit NotificationPermissionDispatcher(RenderFrame* render_frame);
27 ~NotificationPermissionDispatcher() override;
28
29 // Requests permission to display Web Notifications for |origin|. The callback
30 // will be invoked when the permission status is available. This class will
31 // take ownership of |callback|.
32 void RequestPermission(const blink::WebSecurityOrigin& origin,
33 blink::WebNotificationPermissionCallback* callback);
34
35 private:
36 // RenderFrameObserver implementation.
37 void OnDestruct() override;
38
39 void OnPermissionRequestComplete(
40 std::unique_ptr<blink::WebNotificationPermissionCallback> callback,
41 blink::mojom::PermissionStatus status);
42
43 blink::mojom::PermissionServicePtr permission_service_;
44
45 DISALLOW_COPY_AND_ASSIGN(NotificationPermissionDispatcher);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/notification_permission_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698