OLD | NEW |
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 #include "content/browser/permissions/permission_service_context.h" | 5 #include "content/browser/permissions/permission_service_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/permissions/permission_service_impl.h" | 9 #include "content/browser/permissions/permission_service_impl.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 RenderProcessHost* render_process_host) | 65 RenderProcessHost* render_process_host) |
66 : WebContentsObserver(nullptr), | 66 : WebContentsObserver(nullptr), |
67 render_frame_host_(nullptr), | 67 render_frame_host_(nullptr), |
68 render_process_host_(render_process_host) { | 68 render_process_host_(render_process_host) { |
69 } | 69 } |
70 | 70 |
71 PermissionServiceContext::~PermissionServiceContext() { | 71 PermissionServiceContext::~PermissionServiceContext() { |
72 } | 72 } |
73 | 73 |
74 void PermissionServiceContext::CreateService( | 74 void PermissionServiceContext::CreateService( |
75 mojo::InterfaceRequest<blink::mojom::PermissionService> request) { | 75 const service_manager::BindSourceInfo& source_info, |
| 76 blink::mojom::PermissionServiceRequest request) { |
76 services_.push_back( | 77 services_.push_back( |
77 base::MakeUnique<PermissionServiceImpl>(this, std::move(request))); | 78 base::MakeUnique<PermissionServiceImpl>(this, std::move(request))); |
78 } | 79 } |
79 | 80 |
80 void PermissionServiceContext::CreateSubscription( | 81 void PermissionServiceContext::CreateSubscription( |
81 PermissionType permission_type, | 82 PermissionType permission_type, |
82 const url::Origin& origin, | 83 const url::Origin& origin, |
83 PermissionObserverPtr observer) { | 84 PermissionObserverPtr observer) { |
84 BrowserContext* browser_context = GetBrowserContext(); | 85 BrowserContext* browser_context = GetBrowserContext(); |
85 DCHECK(browser_context); | 86 DCHECK(browser_context); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 GURL PermissionServiceContext::GetEmbeddingOrigin() const { | 161 GURL PermissionServiceContext::GetEmbeddingOrigin() const { |
161 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() | 162 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() |
162 : GURL(); | 163 : GURL(); |
163 } | 164 } |
164 | 165 |
165 RenderFrameHost* PermissionServiceContext::render_frame_host() const { | 166 RenderFrameHost* PermissionServiceContext::render_frame_host() const { |
166 return render_frame_host_; | 167 return render_frame_host_; |
167 } | 168 } |
168 | 169 |
169 } // namespace content | 170 } // namespace content |
OLD | NEW |