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