| 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 AddFilter(new MemoryBenchmarkMessageFilter()); | 874 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 875 #endif | 875 #endif |
| 876 AddFilter(new PushMessagingMessageFilter( | 876 AddFilter(new PushMessagingMessageFilter( |
| 877 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 877 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 878 #if defined(OS_ANDROID) | 878 #if defined(OS_ANDROID) |
| 879 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 879 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 880 #endif | 880 #endif |
| 881 AddFilter(new GeofencingDispatcherHost( | 881 AddFilter(new GeofencingDispatcherHost( |
| 882 storage_partition_impl_->GetGeofencingManager())); | 882 storage_partition_impl_->GetGeofencingManager())); |
| 883 if (browser_command_line.HasSwitch( | 883 if (browser_command_line.HasSwitch( |
| 884 switches::kEnableExperimentalWebPlatformFeatures)) | 884 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 885 AddFilter(new BluetoothDispatcherHost()); | 885 scoped_refptr<BluetoothDispatcherHost> bluetooth_dispatcher_host( |
| 886 BluetoothDispatcherHost::Create()); |
| 887 AddFilter(bluetooth_dispatcher_host.get()); |
| 888 } |
| 886 } | 889 } |
| 887 | 890 |
| 888 void RenderProcessHostImpl::RegisterMojoServices() { | 891 void RenderProcessHostImpl::RegisterMojoServices() { |
| 889 mojo_application_host_->service_registry()->AddService( | 892 mojo_application_host_->service_registry()->AddService( |
| 890 base::Bind(&device::BatteryMonitorImpl::Create)); | 893 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 891 | 894 |
| 892 mojo_application_host_->service_registry()->AddService( | 895 mojo_application_host_->service_registry()->AddService( |
| 893 base::Bind(&device::VibrationManagerImpl::Create)); | 896 base::Bind(&device::VibrationManagerImpl::Create)); |
| 894 | 897 |
| 895 mojo_application_host_->service_registry()->AddService( | 898 mojo_application_host_->service_registry()->AddService( |
| (...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2313 | 2316 |
| 2314 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2317 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2315 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2318 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2316 DCHECK_GT(worker_ref_count_, 0); | 2319 DCHECK_GT(worker_ref_count_, 0); |
| 2317 --worker_ref_count_; | 2320 --worker_ref_count_; |
| 2318 if (worker_ref_count_ == 0) | 2321 if (worker_ref_count_ == 0) |
| 2319 Cleanup(); | 2322 Cleanup(); |
| 2320 } | 2323 } |
| 2321 | 2324 |
| 2322 } // namespace content | 2325 } // namespace content |
| OLD | NEW |