| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 #include "gpu/GLES2/gl2extchromium.h" | 137 #include "gpu/GLES2/gl2extchromium.h" |
| 138 #include "gpu/command_buffer/client/gpu_switches.h" | 138 #include "gpu/command_buffer/client/gpu_switches.h" |
| 139 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 139 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 140 #include "gpu/command_buffer/service/gpu_switches.h" | 140 #include "gpu/command_buffer/service/gpu_switches.h" |
| 141 #include "ipc/ipc_channel.h" | 141 #include "ipc/ipc_channel.h" |
| 142 #include "ipc/ipc_logging.h" | 142 #include "ipc/ipc_logging.h" |
| 143 #include "ipc/ipc_switches.h" | 143 #include "ipc/ipc_switches.h" |
| 144 #include "ipc/mojo/ipc_channel_mojo.h" | 144 #include "ipc/mojo/ipc_channel_mojo.h" |
| 145 #include "ipc/mojo/ipc_channel_mojo_host.h" | 145 #include "ipc/mojo/ipc_channel_mojo_host.h" |
| 146 #include "media/base/media_switches.h" | 146 #include "media/base/media_switches.h" |
| 147 #include "media/midi/midi_service_impl.h" |
| 147 #include "net/url_request/url_request_context_getter.h" | 148 #include "net/url_request/url_request_context_getter.h" |
| 148 #include "ppapi/shared_impl/ppapi_switches.h" | 149 #include "ppapi/shared_impl/ppapi_switches.h" |
| 149 #include "storage/browser/fileapi/sandbox_file_system_backend.h" | 150 #include "storage/browser/fileapi/sandbox_file_system_backend.h" |
| 150 #include "third_party/skia/include/core/SkBitmap.h" | 151 #include "third_party/skia/include/core/SkBitmap.h" |
| 151 #include "ui/base/ui_base_switches.h" | 152 #include "ui/base/ui_base_switches.h" |
| 152 #include "ui/events/event_switches.h" | 153 #include "ui/events/event_switches.h" |
| 153 #include "ui/gfx/switches.h" | 154 #include "ui/gfx/switches.h" |
| 154 #include "ui/gl/gl_switches.h" | 155 #include "ui/gl/gl_switches.h" |
| 155 #include "ui/gl/gpu_switching_manager.h" | 156 #include "ui/gl/gpu_switching_manager.h" |
| 156 #include "ui/native_theme/native_theme_switches.h" | 157 #include "ui/native_theme/native_theme_switches.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 mojo_application_host_->service_registry()->AddService( | 901 mojo_application_host_->service_registry()->AddService( |
| 901 base::Bind(&device::BatteryMonitorImpl::Create)); | 902 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 902 | 903 |
| 903 mojo_application_host_->service_registry()->AddService( | 904 mojo_application_host_->service_registry()->AddService( |
| 904 base::Bind(&device::VibrationManagerImpl::Create)); | 905 base::Bind(&device::VibrationManagerImpl::Create)); |
| 905 | 906 |
| 906 mojo_application_host_->service_registry()->AddService( | 907 mojo_application_host_->service_registry()->AddService( |
| 907 base::Bind(&PermissionServiceContext::CreateService, | 908 base::Bind(&PermissionServiceContext::CreateService, |
| 908 base::Unretained(permission_service_context_.get()))); | 909 base::Unretained(permission_service_context_.get()))); |
| 909 | 910 |
| 911 mojo_application_host_->service_registry()->AddService( |
| 912 base::Bind(&media::MidiServiceImpl::Create, |
| 913 GetID(), |
| 914 BrowserMainLoop::GetInstance()->midi_manager())); |
| 915 |
| 910 #if defined(OS_ANDROID) | 916 #if defined(OS_ANDROID) |
| 911 ServiceRegistrarAndroid::RegisterProcessHostServices( | 917 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| 912 mojo_application_host_->service_registry_android()); | 918 mojo_application_host_->service_registry_android()); |
| 913 #endif | 919 #endif |
| 914 | 920 |
| 915 GetContentClient()->browser()->OverrideRenderProcessMojoServices( | 921 GetContentClient()->browser()->OverrideRenderProcessMojoServices( |
| 916 mojo_application_host_->service_registry()); | 922 mojo_application_host_->service_registry()); |
| 917 } | 923 } |
| 918 | 924 |
| 919 int RenderProcessHostImpl::GetNextRoutingID() { | 925 int RenderProcessHostImpl::GetNextRoutingID() { |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 | 2383 |
| 2378 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2384 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2379 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2385 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2380 DCHECK_GT(worker_ref_count_, 0); | 2386 DCHECK_GT(worker_ref_count_, 0); |
| 2381 --worker_ref_count_; | 2387 --worker_ref_count_; |
| 2382 if (worker_ref_count_ == 0) | 2388 if (worker_ref_count_ == 0) |
| 2383 Cleanup(); | 2389 Cleanup(); |
| 2384 } | 2390 } |
| 2385 | 2391 |
| 2386 } // namespace content | 2392 } // namespace content |
| OLD | NEW |