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

Side by Side Diff: content/browser/permissions/permission_service_context.h

Issue 2874053003: Add checks for Feature Policy to the mojo Permission Service (Closed)
Patch Set: Add checks for Feature Policy to the mojo Permission Service Created 3 years, 6 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 | « no previous file | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/common/content_export.h"
9 #include "content/public/browser/permission_type.h" 10 #include "content/public/browser/permission_type.h"
10 #include "content/public/browser/web_contents_observer.h" 11 #include "content/public/browser/web_contents_observer.h"
11 #include "mojo/public/cpp/bindings/strong_binding_set.h" 12 #include "mojo/public/cpp/bindings/strong_binding_set.h"
12 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m.h" 13 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m.h"
13 14
14 namespace service_manager { 15 namespace service_manager {
15 struct BindSourceInfo; 16 struct BindSourceInfo;
16 } 17 }
17 18
18 namespace url { 19 namespace url {
19 class Origin; 20 class Origin;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
24 class RenderFrameHost; 25 class RenderFrameHost;
25 class RenderProcessHost; 26 class RenderProcessHost;
26 27
27 // Provides information to a PermissionService. It is used by the 28 // Provides information to a PermissionService. It is used by the
28 // PermissionServiceImpl to handle request permission UI. 29 // PermissionServiceImpl to handle request permission UI.
29 // There is one PermissionServiceContext per RenderFrameHost/RenderProcessHost 30 // There is one PermissionServiceContext per RenderFrameHost/RenderProcessHost
30 // which owns it. It then owns all PermissionServiceImpl associated to their 31 // which owns it. It then owns all PermissionServiceImpl associated to their
31 // owner. 32 // owner.
32 class PermissionServiceContext : public WebContentsObserver { 33 class CONTENT_EXPORT PermissionServiceContext : public WebContentsObserver {
33 public: 34 public:
34 explicit PermissionServiceContext(RenderFrameHost* render_frame_host); 35 explicit PermissionServiceContext(RenderFrameHost* render_frame_host);
35 explicit PermissionServiceContext(RenderProcessHost* render_process_host); 36 explicit PermissionServiceContext(RenderProcessHost* render_process_host);
36 ~PermissionServiceContext() override; 37 ~PermissionServiceContext() override;
37 38
38 void CreateService(const service_manager::BindSourceInfo& source_info, 39 void CreateService(const service_manager::BindSourceInfo& source_info,
39 blink::mojom::PermissionServiceRequest request); 40 blink::mojom::PermissionServiceRequest request);
40 41
41 void CreateSubscription(PermissionType permission_type, 42 void CreateSubscription(PermissionType permission_type,
42 const url::Origin& origin, 43 const url::Origin& origin,
(...skipping 23 matching lines...) Expand all
66 mojo::StrongBindingSet<blink::mojom::PermissionService> services_; 67 mojo::StrongBindingSet<blink::mojom::PermissionService> services_;
67 std::unordered_map<int, std::unique_ptr<PermissionSubscription>> 68 std::unordered_map<int, std::unique_ptr<PermissionSubscription>>
68 subscriptions_; 69 subscriptions_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext); 71 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext);
71 }; 72 };
72 73
73 } // namespace content 74 } // namespace content
74 75
75 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 76 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698