Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include "base/strings/string_number_conversions.h" | 28 #include "base/strings/string_number_conversions.h" |
| 29 #include "base/strings/string_util.h" | 29 #include "base/strings/string_util.h" |
| 30 #include "base/supports_user_data.h" | 30 #include "base/supports_user_data.h" |
| 31 #include "base/sys_info.h" | 31 #include "base/sys_info.h" |
| 32 #include "base/threading/thread.h" | 32 #include "base/threading/thread.h" |
| 33 #include "base/threading/thread_restrictions.h" | 33 #include "base/threading/thread_restrictions.h" |
| 34 #include "base/tracked_objects.h" | 34 #include "base/tracked_objects.h" |
| 35 #include "cc/base/switches.h" | 35 #include "cc/base/switches.h" |
| 36 #include "content/browser/appcache/appcache_dispatcher_host.h" | 36 #include "content/browser/appcache/appcache_dispatcher_host.h" |
| 37 #include "content/browser/appcache/chrome_appcache_service.h" | 37 #include "content/browser/appcache/chrome_appcache_service.h" |
| 38 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" | |
| 38 #include "content/browser/browser_child_process_host_impl.h" | 39 #include "content/browser/browser_child_process_host_impl.h" |
| 39 #include "content/browser/browser_main.h" | 40 #include "content/browser/browser_main.h" |
| 40 #include "content/browser/browser_main_loop.h" | 41 #include "content/browser/browser_main_loop.h" |
| 41 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 42 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 42 #include "content/browser/child_process_security_policy_impl.h" | 43 #include "content/browser/child_process_security_policy_impl.h" |
| 43 #include "content/browser/device_sensors/device_light_message_filter.h" | 44 #include "content/browser/device_sensors/device_light_message_filter.h" |
| 44 #include "content/browser/device_sensors/device_motion_message_filter.h" | 45 #include "content/browser/device_sensors/device_motion_message_filter.h" |
| 45 #include "content/browser/device_sensors/device_orientation_message_filter.h" | 46 #include "content/browser/device_sensors/device_orientation_message_filter.h" |
| 46 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 47 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 47 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 48 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 867 AddFilter(new MemoryBenchmarkMessageFilter()); | 868 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 868 #endif | 869 #endif |
| 869 AddFilter(new VibrationMessageFilter()); | 870 AddFilter(new VibrationMessageFilter()); |
| 870 AddFilter(new PushMessagingMessageFilter( | 871 AddFilter(new PushMessagingMessageFilter( |
| 871 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 872 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 872 #if defined(OS_ANDROID) | 873 #if defined(OS_ANDROID) |
| 873 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 874 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 874 #endif | 875 #endif |
| 875 AddFilter(new GeofencingDispatcherHost( | 876 AddFilter(new GeofencingDispatcherHost( |
| 876 storage_partition_impl_->GetGeofencingManager())); | 877 storage_partition_impl_->GetGeofencingManager())); |
| 878 AddFilter(new BluetoothDispatcherHost()); | |
|
Jeffrey Yasskin
2014/11/24 23:30:11
Dumb question: on the browser side, where's the ri
scheib
2014/11/25 16:11:06
Here is a good place. I've added a switch check.
| |
| 877 } | 879 } |
| 878 | 880 |
| 879 void RenderProcessHostImpl::RegisterMojoServices() { | 881 void RenderProcessHostImpl::RegisterMojoServices() { |
| 880 mojo_application_host_->service_registry()->AddService( | 882 mojo_application_host_->service_registry()->AddService( |
| 881 base::Bind(&device::BatteryMonitorImpl::Create)); | 883 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 882 | 884 |
| 883 mojo_application_host_->service_registry()->AddService( | 885 mojo_application_host_->service_registry()->AddService( |
| 884 base::Bind(&PermissionServiceContext::CreateService, | 886 base::Bind(&PermissionServiceContext::CreateService, |
| 885 base::Unretained(permission_service_context_.get()))); | 887 base::Unretained(permission_service_context_.get()))); |
| 886 } | 888 } |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2247 | 2249 |
| 2248 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2250 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2249 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2251 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2250 DCHECK_GT(worker_ref_count_, 0); | 2252 DCHECK_GT(worker_ref_count_, 0); |
| 2251 --worker_ref_count_; | 2253 --worker_ref_count_; |
| 2252 if (worker_ref_count_ == 0) | 2254 if (worker_ref_count_ == 0) |
| 2253 Cleanup(); | 2255 Cleanup(); |
| 2254 } | 2256 } |
| 2255 | 2257 |
| 2256 } // namespace content | 2258 } // namespace content |
| OLD | NEW |