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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 #if defined(OS_ANDROID) | 926 #if defined(OS_ANDROID) |
927 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 927 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
928 #endif | 928 #endif |
929 AddFilter(new GeofencingDispatcherHost( | 929 AddFilter(new GeofencingDispatcherHost( |
930 storage_partition_impl_->GetGeofencingManager())); | 930 storage_partition_impl_->GetGeofencingManager())); |
931 AddFilter(new NavigatorConnectDispatcherHost( | 931 AddFilter(new NavigatorConnectDispatcherHost( |
932 storage_partition_impl_->GetNavigatorConnectContext(), | 932 storage_partition_impl_->GetNavigatorConnectContext(), |
933 message_port_message_filter_.get())); | 933 message_port_message_filter_.get())); |
934 if (browser_command_line.HasSwitch( | 934 if (browser_command_line.HasSwitch( |
935 switches::kEnableExperimentalWebPlatformFeatures)) { | 935 switches::kEnableExperimentalWebPlatformFeatures)) { |
936 AddFilter(new BluetoothDispatcherHost()); | 936 bluetooth_dispatcher_host_ = new BluetoothDispatcherHost(); |
| 937 AddFilter(bluetooth_dispatcher_host_.get()); |
937 } | 938 } |
938 } | 939 } |
939 | 940 |
940 void RenderProcessHostImpl::RegisterMojoServices() { | 941 void RenderProcessHostImpl::RegisterMojoServices() { |
941 mojo_application_host_->service_registry()->AddService( | 942 mojo_application_host_->service_registry()->AddService( |
942 base::Bind(&device::BatteryMonitorImpl::Create)); | 943 base::Bind(&device::BatteryMonitorImpl::Create)); |
943 | 944 |
944 mojo_application_host_->service_registry()->AddService( | 945 mojo_application_host_->service_registry()->AddService( |
945 base::Bind(&device::VibrationManagerImpl::Create)); | 946 base::Bind(&device::VibrationManagerImpl::Create)); |
946 | 947 |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 --worker_ref_count_; | 2458 --worker_ref_count_; |
2458 if (worker_ref_count_ == 0) | 2459 if (worker_ref_count_ == 0) |
2459 Cleanup(); | 2460 Cleanup(); |
2460 } | 2461 } |
2461 | 2462 |
2462 void RenderProcessHostImpl::GetAudioOutputControllers( | 2463 void RenderProcessHostImpl::GetAudioOutputControllers( |
2463 const GetAudioOutputControllersCallback& callback) const { | 2464 const GetAudioOutputControllersCallback& callback) const { |
2464 audio_renderer_host()->GetOutputControllers(callback); | 2465 audio_renderer_host()->GetOutputControllers(callback); |
2465 } | 2466 } |
2466 | 2467 |
| 2468 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2469 return bluetooth_dispatcher_host_.get(); |
| 2470 } |
| 2471 |
2467 } // namespace content | 2472 } // namespace content |
OLD | NEW |