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

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

Issue 1373883003: Move geolocation and permission mojoms into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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_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 "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
12 12
13 namespace permission {
14 class PermissionService;
15 }
16
13 namespace content { 17 namespace content {
14 18
15 class PermissionService;
16 class PermissionServiceImpl; 19 class PermissionServiceImpl;
17 class RenderFrameHost; 20 class RenderFrameHost;
18 class RenderProcessHost; 21 class RenderProcessHost;
19 22
20 // Provides information to a PermissionService. It is used by the 23 // Provides information to a PermissionService. It is used by the
21 // PermissionService to handle request permission UI. 24 // PermissionService to handle request permission UI.
22 // There is one PermissionServiceContext per RenderFrameHost/RenderProcessHost 25 // There is one PermissionServiceContext per RenderFrameHost/RenderProcessHost
23 // which owns it. It then owns all PermissionService associated to their owner. 26 // which owns it. It then owns all PermissionService associated to their owner.
24 class PermissionServiceContext : public WebContentsObserver { 27 class PermissionServiceContext : public WebContentsObserver {
25 public: 28 public:
26 explicit PermissionServiceContext(RenderFrameHost* render_frame_host); 29 explicit PermissionServiceContext(RenderFrameHost* render_frame_host);
27 explicit PermissionServiceContext(RenderProcessHost* render_process_host); 30 explicit PermissionServiceContext(RenderProcessHost* render_process_host);
28 ~PermissionServiceContext() override; 31 ~PermissionServiceContext() override;
29 32
30 void CreateService(mojo::InterfaceRequest<PermissionService> request); 33 void CreateService(
34 mojo::InterfaceRequest<permission::PermissionService> request);
31 35
32 // Called by a PermissionService identified as |service| when it has a 36 // Called by a PermissionService identified as |service| when it has a
33 // connection error in order to get unregistered and killed. 37 // connection error in order to get unregistered and killed.
34 void ServiceHadConnectionError(PermissionServiceImpl* service); 38 void ServiceHadConnectionError(PermissionServiceImpl* service);
35 39
36 BrowserContext* GetBrowserContext() const; 40 BrowserContext* GetBrowserContext() const;
37 GURL GetEmbeddingOrigin() const; 41 GURL GetEmbeddingOrigin() const;
38 42
39 RenderFrameHost* render_frame_host() const; 43 RenderFrameHost* render_frame_host() const;
40 44
(...skipping 11 matching lines...) Expand all
52 RenderFrameHost* render_frame_host_; 56 RenderFrameHost* render_frame_host_;
53 RenderProcessHost* render_process_host_; 57 RenderProcessHost* render_process_host_;
54 ScopedVector<PermissionServiceImpl> services_; 58 ScopedVector<PermissionServiceImpl> services_;
55 59
56 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext); 60 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext);
57 }; 61 };
58 62
59 } // namespace content 63 } // namespace content
60 64
61 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 65 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/media/cdm/browser_cdm_manager.cc ('k') | content/browser/permissions/permission_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698