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/media/session/media_session_service_impl.h" |
41 #include "content/browser/permissions/permission_service_context.h" | 41 #include "content/browser/permissions/permission_service_context.h" |
42 #include "content/browser/permissions/permission_service_impl.h" | 42 #include "content/browser/permissions/permission_service_impl.h" |
43 #include "content/browser/presentation/presentation_service_impl.h" | 43 #include "content/browser/presentation/presentation_service_impl.h" |
44 #include "content/browser/renderer_host/input/input_router_impl.h" | 44 #include "content/browser/renderer_host/input/input_router_impl.h" |
45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 45 #include "content/browser/renderer_host/input/timeout_monitor.h" |
46 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
47 #include "content/browser/renderer_host/render_view_host_delegate.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate.h" |
48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
49 #include "content/browser/renderer_host/render_view_host_impl.h" | 49 #include "content/browser/renderer_host/render_view_host_impl.h" |
50 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 50 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 if (!permission_service_context_) | 2160 if (!permission_service_context_) |
2161 permission_service_context_.reset(new PermissionServiceContext(this)); | 2161 permission_service_context_.reset(new PermissionServiceContext(this)); |
2162 | 2162 |
2163 GetInterfaceRegistry()->AddInterface( | 2163 GetInterfaceRegistry()->AddInterface( |
2164 base::Bind(&PermissionServiceContext::CreateService, | 2164 base::Bind(&PermissionServiceContext::CreateService, |
2165 base::Unretained(permission_service_context_.get()))); | 2165 base::Unretained(permission_service_context_.get()))); |
2166 | 2166 |
2167 GetInterfaceRegistry()->AddInterface(base::Bind( | 2167 GetInterfaceRegistry()->AddInterface(base::Bind( |
2168 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2168 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
2169 | 2169 |
| 2170 GetInterfaceRegistry()->AddInterface( |
| 2171 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); |
| 2172 |
2170 #if defined(OS_ANDROID) | 2173 #if defined(OS_ANDROID) |
2171 GetInterfaceRegistry()->AddInterface( | 2174 GetInterfaceRegistry()->AddInterface( |
2172 GetGlobalJavaInterfaces() | 2175 GetGlobalJavaInterfaces() |
2173 ->CreateInterfaceFactory<device::VibrationManager>()); | 2176 ->CreateInterfaceFactory<device::VibrationManager>()); |
2174 GetInterfaceRegistry()->AddInterface( | |
2175 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); | |
2176 #else | 2177 #else |
2177 GetInterfaceRegistry()->AddInterface( | 2178 GetInterfaceRegistry()->AddInterface( |
2178 base::Bind(&device::VibrationManagerImpl::Create)); | 2179 base::Bind(&device::VibrationManagerImpl::Create)); |
2179 #endif | 2180 #endif |
2180 | 2181 |
2181 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2182 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
2182 switches::kEnableWebBluetooth); | 2183 switches::kEnableWebBluetooth); |
2183 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2184 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
2184 enable_web_bluetooth = true; | 2185 enable_web_bluetooth = true; |
2185 #endif | 2186 #endif |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3114 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3115 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3115 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3116 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3116 return web_bluetooth_service_.get(); | 3117 return web_bluetooth_service_.get(); |
3117 } | 3118 } |
3118 | 3119 |
3119 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3120 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3120 web_bluetooth_service_.reset(); | 3121 web_bluetooth_service_.reset(); |
3121 } | 3122 } |
3122 | 3123 |
3123 } // namespace content | 3124 } // namespace content |
OLD | NEW |