OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "content/browser/frame_host/frame_tree_node.h" | 30 #include "content/browser/frame_host/frame_tree_node.h" |
31 #include "content/browser/frame_host/navigation_entry_impl.h" | 31 #include "content/browser/frame_host/navigation_entry_impl.h" |
32 #include "content/browser/frame_host/navigation_handle_impl.h" | 32 #include "content/browser/frame_host/navigation_handle_impl.h" |
33 #include "content/browser/frame_host/navigation_request.h" | 33 #include "content/browser/frame_host/navigation_request.h" |
34 #include "content/browser/frame_host/navigator.h" | 34 #include "content/browser/frame_host/navigator.h" |
35 #include "content/browser/frame_host/navigator_impl.h" | 35 #include "content/browser/frame_host/navigator_impl.h" |
36 #include "content/browser/frame_host/render_frame_host_delegate.h" | 36 #include "content/browser/frame_host/render_frame_host_delegate.h" |
37 #include "content/browser/frame_host/render_frame_proxy_host.h" | 37 #include "content/browser/frame_host/render_frame_proxy_host.h" |
38 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 38 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
39 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 39 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 40 #include "content/browser/media/android/media_session_service_impl.h" |
40 #include "content/browser/permissions/permission_service_context.h" | 41 #include "content/browser/permissions/permission_service_context.h" |
41 #include "content/browser/permissions/permission_service_impl.h" | 42 #include "content/browser/permissions/permission_service_impl.h" |
42 #include "content/browser/presentation/presentation_service_impl.h" | 43 #include "content/browser/presentation/presentation_service_impl.h" |
43 #include "content/browser/renderer_host/input/input_router_impl.h" | 44 #include "content/browser/renderer_host/input/input_router_impl.h" |
44 #include "content/browser/renderer_host/input/timeout_monitor.h" | 45 #include "content/browser/renderer_host/input/timeout_monitor.h" |
45 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
46 #include "content/browser/renderer_host/render_view_host_delegate.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate.h" |
47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
48 #include "content/browser/renderer_host/render_view_host_impl.h" | 49 #include "content/browser/renderer_host/render_view_host_impl.h" |
49 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 50 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 base::Bind(&PermissionServiceContext::CreateService, | 2164 base::Bind(&PermissionServiceContext::CreateService, |
2164 base::Unretained(permission_service_context_.get()))); | 2165 base::Unretained(permission_service_context_.get()))); |
2165 | 2166 |
2166 GetInterfaceRegistry()->AddInterface(base::Bind( | 2167 GetInterfaceRegistry()->AddInterface(base::Bind( |
2167 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2168 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
2168 | 2169 |
2169 #if defined(OS_ANDROID) | 2170 #if defined(OS_ANDROID) |
2170 GetInterfaceRegistry()->AddInterface( | 2171 GetInterfaceRegistry()->AddInterface( |
2171 GetGlobalJavaInterfaces() | 2172 GetGlobalJavaInterfaces() |
2172 ->CreateInterfaceFactory<device::VibrationManager>()); | 2173 ->CreateInterfaceFactory<device::VibrationManager>()); |
| 2174 GetInterfaceRegistry()->AddInterface( |
| 2175 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); |
2173 #else | 2176 #else |
2174 GetInterfaceRegistry()->AddInterface( | 2177 GetInterfaceRegistry()->AddInterface( |
2175 base::Bind(&device::VibrationManagerImpl::Create)); | 2178 base::Bind(&device::VibrationManagerImpl::Create)); |
2176 #endif | 2179 #endif |
2177 | 2180 |
2178 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2181 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
2179 switches::kEnableWebBluetooth); | 2182 switches::kEnableWebBluetooth); |
2180 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2183 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
2181 enable_web_bluetooth = true; | 2184 enable_web_bluetooth = true; |
2182 #endif | 2185 #endif |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3111 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3114 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3112 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3115 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3113 return web_bluetooth_service_.get(); | 3116 return web_bluetooth_service_.get(); |
3114 } | 3117 } |
3115 | 3118 |
3116 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3119 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3117 web_bluetooth_service_.reset(); | 3120 web_bluetooth_service_.reset(); |
3118 } | 3121 } |
3119 | 3122 |
3120 } // namespace content | 3123 } // namespace content |
OLD | NEW |