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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2143 base::Bind(&PermissionServiceContext::CreateService, | 2144 base::Bind(&PermissionServiceContext::CreateService, |
2144 base::Unretained(permission_service_context_.get()))); | 2145 base::Unretained(permission_service_context_.get()))); |
2145 | 2146 |
2146 GetInterfaceRegistry()->AddInterface(base::Bind( | 2147 GetInterfaceRegistry()->AddInterface(base::Bind( |
2147 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2148 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
2148 | 2149 |
2149 #if defined(OS_ANDROID) | 2150 #if defined(OS_ANDROID) |
2150 GetInterfaceRegistry()->AddInterface( | 2151 GetInterfaceRegistry()->AddInterface( |
2151 GetGlobalJavaInterfaces() | 2152 GetGlobalJavaInterfaces() |
2152 ->CreateInterfaceFactory<device::VibrationManager>()); | 2153 ->CreateInterfaceFactory<device::VibrationManager>()); |
| 2154 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2155 &MediaSessionServiceImpl::Create, base::Unretained(this))); |
2153 #else | 2156 #else |
2154 GetInterfaceRegistry()->AddInterface( | 2157 GetInterfaceRegistry()->AddInterface( |
2155 base::Bind(&device::VibrationManagerImpl::Create)); | 2158 base::Bind(&device::VibrationManagerImpl::Create)); |
2156 #endif | 2159 #endif |
2157 | 2160 |
2158 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2161 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
2159 switches::kEnableWebBluetooth); | 2162 switches::kEnableWebBluetooth); |
2160 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2163 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
2161 enable_web_bluetooth = true; | 2164 enable_web_bluetooth = true; |
2162 #endif | 2165 #endif |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3084 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3087 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3085 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3088 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3086 return web_bluetooth_service_.get(); | 3089 return web_bluetooth_service_.get(); |
3087 } | 3090 } |
3088 | 3091 |
3089 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3092 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3090 web_bluetooth_service_.reset(); | 3093 web_bluetooth_service_.reset(); |
3091 } | 3094 } |
3092 | 3095 |
3093 } // namespace content | 3096 } // namespace content |
OLD | NEW |