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/navigation_details.h" | 10 #include "content/public/browser/navigation_details.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 RenderProcessHost* render_process_host) | 25 RenderProcessHost* render_process_host) |
26 : WebContentsObserver(nullptr), | 26 : WebContentsObserver(nullptr), |
27 render_frame_host_(nullptr), | 27 render_frame_host_(nullptr), |
28 render_process_host_(render_process_host) { | 28 render_process_host_(render_process_host) { |
29 } | 29 } |
30 | 30 |
31 PermissionServiceContext::~PermissionServiceContext() { | 31 PermissionServiceContext::~PermissionServiceContext() { |
32 } | 32 } |
33 | 33 |
34 void PermissionServiceContext::CreateService( | 34 void PermissionServiceContext::CreateService( |
35 mojo::InterfaceRequest<mojom::PermissionService> request) { | 35 mojo::InterfaceRequest<blink::mojom::PermissionService> request) { |
36 services_.push_back(new PermissionServiceImpl(this, std::move(request))); | 36 services_.push_back(new PermissionServiceImpl(this, std::move(request))); |
37 } | 37 } |
38 | 38 |
39 void PermissionServiceContext::ServiceHadConnectionError( | 39 void PermissionServiceContext::ServiceHadConnectionError( |
40 PermissionServiceImpl* service) { | 40 PermissionServiceImpl* service) { |
41 auto it = std::find(services_.begin(), services_.end(), service); | 41 auto it = std::find(services_.begin(), services_.end(), service); |
42 DCHECK(it != services_.end()); | 42 DCHECK(it != services_.end()); |
43 services_.erase(it); | 43 services_.erase(it); |
44 } | 44 } |
45 | 45 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 GURL PermissionServiceContext::GetEmbeddingOrigin() const { | 85 GURL PermissionServiceContext::GetEmbeddingOrigin() const { |
86 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() | 86 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() |
87 : GURL(); | 87 : GURL(); |
88 } | 88 } |
89 | 89 |
90 RenderFrameHost* PermissionServiceContext::render_frame_host() const { | 90 RenderFrameHost* PermissionServiceContext::render_frame_host() const { |
91 return render_frame_host_; | 91 return render_frame_host_; |
92 } | 92 } |
93 | 93 |
94 } // namespace content | 94 } // namespace content |
OLD | NEW |