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 17 matching lines...) Expand all Loading... |
28 #include "content/browser/frame_host/frame_tree_node.h" | 28 #include "content/browser/frame_host/frame_tree_node.h" |
29 #include "content/browser/frame_host/navigation_entry_impl.h" | 29 #include "content/browser/frame_host/navigation_entry_impl.h" |
30 #include "content/browser/frame_host/navigation_handle_impl.h" | 30 #include "content/browser/frame_host/navigation_handle_impl.h" |
31 #include "content/browser/frame_host/navigation_request.h" | 31 #include "content/browser/frame_host/navigation_request.h" |
32 #include "content/browser/frame_host/navigator.h" | 32 #include "content/browser/frame_host/navigator.h" |
33 #include "content/browser/frame_host/navigator_impl.h" | 33 #include "content/browser/frame_host/navigator_impl.h" |
34 #include "content/browser/frame_host/render_frame_host_delegate.h" | 34 #include "content/browser/frame_host/render_frame_host_delegate.h" |
35 #include "content/browser/frame_host/render_frame_proxy_host.h" | 35 #include "content/browser/frame_host/render_frame_proxy_host.h" |
36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
37 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 37 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 38 #include "content/browser/media/android/media_session_service_impl.h" |
38 #include "content/browser/permissions/permission_service_context.h" | 39 #include "content/browser/permissions/permission_service_context.h" |
39 #include "content/browser/permissions/permission_service_impl.h" | 40 #include "content/browser/permissions/permission_service_impl.h" |
40 #include "content/browser/presentation/presentation_service_impl.h" | 41 #include "content/browser/presentation/presentation_service_impl.h" |
41 #include "content/browser/renderer_host/input/input_router_impl.h" | 42 #include "content/browser/renderer_host/input/input_router_impl.h" |
42 #include "content/browser/renderer_host/input/timeout_monitor.h" | 43 #include "content/browser/renderer_host/input/timeout_monitor.h" |
43 #include "content/browser/renderer_host/render_process_host_impl.h" | 44 #include "content/browser/renderer_host/render_process_host_impl.h" |
44 #include "content/browser/renderer_host/render_view_host_delegate.h" | 45 #include "content/browser/renderer_host/render_view_host_delegate.h" |
45 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
46 #include "content/browser/renderer_host/render_view_host_impl.h" | 47 #include "content/browser/renderer_host/render_view_host_impl.h" |
47 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 48 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2137 base::Bind(&PermissionServiceContext::CreateService, | 2138 base::Bind(&PermissionServiceContext::CreateService, |
2138 base::Unretained(permission_service_context_.get()))); | 2139 base::Unretained(permission_service_context_.get()))); |
2139 | 2140 |
2140 GetInterfaceRegistry()->AddInterface(base::Bind( | 2141 GetInterfaceRegistry()->AddInterface(base::Bind( |
2141 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2142 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
2142 | 2143 |
2143 #if defined(OS_ANDROID) | 2144 #if defined(OS_ANDROID) |
2144 GetInterfaceRegistry()->AddInterface( | 2145 GetInterfaceRegistry()->AddInterface( |
2145 GetGlobalJavaInterfaces() | 2146 GetGlobalJavaInterfaces() |
2146 ->CreateInterfaceFactory<device::VibrationManager>()); | 2147 ->CreateInterfaceFactory<device::VibrationManager>()); |
| 2148 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2149 &MediaSessionServiceImpl::Create, base::Unretained(this))); |
2147 #else | 2150 #else |
2148 GetInterfaceRegistry()->AddInterface( | 2151 GetInterfaceRegistry()->AddInterface( |
2149 base::Bind(&device::VibrationManagerImpl::Create)); | 2152 base::Bind(&device::VibrationManagerImpl::Create)); |
2150 #endif | 2153 #endif |
2151 | 2154 |
2152 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2155 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
2153 switches::kEnableWebBluetooth); | 2156 switches::kEnableWebBluetooth); |
2154 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2157 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
2155 enable_web_bluetooth = true; | 2158 enable_web_bluetooth = true; |
2156 #endif | 2159 #endif |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3087 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3090 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3088 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3091 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3089 return web_bluetooth_service_.get(); | 3092 return web_bluetooth_service_.get(); |
3090 } | 3093 } |
3091 | 3094 |
3092 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3095 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3093 web_bluetooth_service_.reset(); | 3096 web_bluetooth_service_.reset(); |
3094 } | 3097 } |
3095 | 3098 |
3096 } // namespace content | 3099 } // namespace content |
OLD | NEW |