OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 AddFilter(new BluetoothDispatcherHost()); | 883 AddFilter(new BluetoothDispatcherHost()); |
884 } | 884 } |
885 | 885 |
886 void RenderProcessHostImpl::RegisterMojoServices() { | 886 void RenderProcessHostImpl::RegisterMojoServices() { |
887 mojo_application_host_->service_registry()->AddService( | 887 mojo_application_host_->service_registry()->AddService( |
888 base::Bind(&device::BatteryMonitorImpl::Create)); | 888 base::Bind(&device::BatteryMonitorImpl::Create)); |
889 | 889 |
890 mojo_application_host_->service_registry()->AddService( | 890 mojo_application_host_->service_registry()->AddService( |
891 base::Bind(&PermissionServiceContext::CreateService, | 891 base::Bind(&PermissionServiceContext::CreateService, |
892 base::Unretained(permission_service_context_.get()))); | 892 base::Unretained(permission_service_context_.get()))); |
| 893 |
| 894 GetContentClient()->browser()->OverridePerProcessMojoServices( |
| 895 mojo_application_host_->service_registry()); |
893 } | 896 } |
894 | 897 |
895 int RenderProcessHostImpl::GetNextRoutingID() { | 898 int RenderProcessHostImpl::GetNextRoutingID() { |
896 return widget_helper_->GetNextRoutingID(); | 899 return widget_helper_->GetNextRoutingID(); |
897 } | 900 } |
898 | 901 |
899 void RenderProcessHostImpl::ResumeDeferredNavigation( | 902 void RenderProcessHostImpl::ResumeDeferredNavigation( |
900 const GlobalRequestID& request_id) { | 903 const GlobalRequestID& request_id) { |
901 widget_helper_->ResumeDeferredNavigation(request_id); | 904 widget_helper_->ResumeDeferredNavigation(request_id); |
902 } | 905 } |
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 | 2273 |
2271 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2274 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2272 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2275 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2273 DCHECK_GT(worker_ref_count_, 0); | 2276 DCHECK_GT(worker_ref_count_, 0); |
2274 --worker_ref_count_; | 2277 --worker_ref_count_; |
2275 if (worker_ref_count_ == 0) | 2278 if (worker_ref_count_ == 0) |
2276 Cleanup(); | 2279 Cleanup(); |
2277 } | 2280 } |
2278 | 2281 |
2279 } // namespace content | 2282 } // namespace content |
OLD | NEW |