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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 #include "ui/base/ui_base_switches.h" | 150 #include "ui/base/ui_base_switches.h" |
151 #include "ui/events/event_switches.h" | 151 #include "ui/events/event_switches.h" |
152 #include "ui/gfx/switches.h" | 152 #include "ui/gfx/switches.h" |
153 #include "ui/gl/gl_switches.h" | 153 #include "ui/gl/gl_switches.h" |
154 #include "ui/gl/gpu_switching_manager.h" | 154 #include "ui/gl/gpu_switching_manager.h" |
155 #include "ui/native_theme/native_theme_switches.h" | 155 #include "ui/native_theme/native_theme_switches.h" |
156 | 156 |
157 #if defined(OS_ANDROID) | 157 #if defined(OS_ANDROID) |
158 #include "content/browser/android/child_process_launcher_android.h" | 158 #include "content/browser/android/child_process_launcher_android.h" |
159 #include "content/browser/media/android/browser_demuxer_android.h" | 159 #include "content/browser/media/android/browser_demuxer_android.h" |
| 160 #include "content/browser/mojo/service_registrar_android.h" |
160 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" | 161 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" |
161 #endif | 162 #endif |
162 | 163 |
163 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
164 #include "base/win/scoped_com_initializer.h" | 165 #include "base/win/scoped_com_initializer.h" |
165 #include "content/common/font_cache_dispatcher_win.h" | 166 #include "content/common/font_cache_dispatcher_win.h" |
166 #include "content/common/sandbox_win.h" | 167 #include "content/common/sandbox_win.h" |
167 #include "ui/gfx/win/dpi.h" | 168 #include "ui/gfx/win/dpi.h" |
168 #endif | 169 #endif |
169 | 170 |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 mojo_application_host_->service_registry()->AddService( | 892 mojo_application_host_->service_registry()->AddService( |
892 base::Bind(&device::BatteryMonitorImpl::Create)); | 893 base::Bind(&device::BatteryMonitorImpl::Create)); |
893 | 894 |
894 mojo_application_host_->service_registry()->AddService( | 895 mojo_application_host_->service_registry()->AddService( |
895 base::Bind(&device::VibrationManagerImpl::Create)); | 896 base::Bind(&device::VibrationManagerImpl::Create)); |
896 | 897 |
897 mojo_application_host_->service_registry()->AddService( | 898 mojo_application_host_->service_registry()->AddService( |
898 base::Bind(&PermissionServiceContext::CreateService, | 899 base::Bind(&PermissionServiceContext::CreateService, |
899 base::Unretained(permission_service_context_.get()))); | 900 base::Unretained(permission_service_context_.get()))); |
900 | 901 |
| 902 #if defined(OS_ANDROID) |
| 903 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| 904 mojo_application_host_->service_registry_android()); |
| 905 #endif |
| 906 |
901 GetContentClient()->browser()->OverrideRenderProcessMojoServices( | 907 GetContentClient()->browser()->OverrideRenderProcessMojoServices( |
902 mojo_application_host_->service_registry()); | 908 mojo_application_host_->service_registry()); |
903 } | 909 } |
904 | 910 |
905 int RenderProcessHostImpl::GetNextRoutingID() { | 911 int RenderProcessHostImpl::GetNextRoutingID() { |
906 return widget_helper_->GetNextRoutingID(); | 912 return widget_helper_->GetNextRoutingID(); |
907 } | 913 } |
908 | 914 |
909 void RenderProcessHostImpl::ResumeDeferredNavigation( | 915 void RenderProcessHostImpl::ResumeDeferredNavigation( |
910 const GlobalRequestID& request_id) { | 916 const GlobalRequestID& request_id) { |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 | 2318 |
2313 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2319 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2314 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2320 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2315 DCHECK_GT(worker_ref_count_, 0); | 2321 DCHECK_GT(worker_ref_count_, 0); |
2316 --worker_ref_count_; | 2322 --worker_ref_count_; |
2317 if (worker_ref_count_ == 0) | 2323 if (worker_ref_count_ == 0) |
2318 Cleanup(); | 2324 Cleanup(); |
2319 } | 2325 } |
2320 | 2326 |
2321 } // namespace content | 2327 } // namespace content |
OLD | NEW |