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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "content/browser/renderer_host/input/input_router_impl.h" | 45 #include "content/browser/renderer_host/input/input_router_impl.h" |
46 #include "content/browser/renderer_host/input/timeout_monitor.h" | 46 #include "content/browser/renderer_host/input/timeout_monitor.h" |
47 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" | 47 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" |
48 #include "content/browser/renderer_host/render_process_host_impl.h" | 48 #include "content/browser/renderer_host/render_process_host_impl.h" |
49 #include "content/browser/renderer_host/render_view_host_delegate.h" | 49 #include "content/browser/renderer_host/render_view_host_delegate.h" |
50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
51 #include "content/browser/renderer_host/render_view_host_impl.h" | 51 #include "content/browser/renderer_host/render_view_host_impl.h" |
52 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 52 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
53 #include "content/browser/renderer_host/render_widget_host_impl.h" | 53 #include "content/browser/renderer_host/render_widget_host_impl.h" |
54 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 54 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 55 #include "content/browser/screen_orientation/screen_orientation_service_impl.h" |
55 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 56 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
56 #include "content/browser/websockets/websocket_manager.h" | 57 #include "content/browser/websockets/websocket_manager.h" |
57 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 58 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
58 #include "content/common/accessibility_messages.h" | 59 #include "content/common/accessibility_messages.h" |
59 #include "content/common/associated_interface_provider_impl.h" | 60 #include "content/common/associated_interface_provider_impl.h" |
60 #include "content/common/associated_interfaces.mojom.h" | 61 #include "content/common/associated_interfaces.mojom.h" |
61 #include "content/common/frame_messages.h" | 62 #include "content/common/frame_messages.h" |
62 #include "content/common/frame_owner_properties.h" | 63 #include "content/common/frame_owner_properties.h" |
63 #include "content/common/input_messages.h" | 64 #include "content/common/input_messages.h" |
64 #include "content/common/inter_process_time_ticks_converter.h" | 65 #include "content/common/inter_process_time_ticks_converter.h" |
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 ->GetBrowserContext() | 2241 ->GetBrowserContext() |
2241 ->GetResourceContext() | 2242 ->GetResourceContext() |
2242 ->GetMediaDeviceIDSalt(), | 2243 ->GetMediaDeviceIDSalt(), |
2243 base::Unretained(media_stream_manager), | 2244 base::Unretained(media_stream_manager), |
2244 base::CommandLine::ForCurrentProcess()->HasSwitch( | 2245 base::CommandLine::ForCurrentProcess()->HasSwitch( |
2245 switches::kUseFakeUIForMediaStream)), | 2246 switches::kUseFakeUIForMediaStream)), |
2246 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 2247 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
2247 } | 2248 } |
2248 #endif | 2249 #endif |
2249 | 2250 |
| 2251 ScreenOrientationProvider* screen_orientation_provider = |
| 2252 delegate_ ? delegate_->GetScreenOrientationProvider() : nullptr; |
| 2253 if (screen_orientation_provider) { |
| 2254 GetInterfaceRegistry()->AddInterface( |
| 2255 base::Bind(&ScreenOrientationServiceImpl::Create, |
| 2256 base::Unretained(screen_orientation_provider))); |
| 2257 } |
| 2258 |
2250 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( | 2259 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
2251 GetInterfaceRegistry(), this); | 2260 GetInterfaceRegistry(), this); |
2252 } | 2261 } |
2253 | 2262 |
2254 void RenderFrameHostImpl::ResetWaitingState() { | 2263 void RenderFrameHostImpl::ResetWaitingState() { |
2255 DCHECK(is_active()); | 2264 DCHECK(is_active()); |
2256 | 2265 |
2257 // Whenever we reset the RFH state, we should not be waiting for beforeunload | 2266 // Whenever we reset the RFH state, we should not be waiting for beforeunload |
2258 // or close acks. We clear them here to be safe, since they can cause | 2267 // or close acks. We clear them here to be safe, since they can cause |
2259 // navigations to be ignored in OnDidCommitProvisionalLoad. | 2268 // navigations to be ignored in OnDidCommitProvisionalLoad. |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3153 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3162 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3154 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3163 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3155 return web_bluetooth_service_.get(); | 3164 return web_bluetooth_service_.get(); |
3156 } | 3165 } |
3157 | 3166 |
3158 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3167 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3159 web_bluetooth_service_.reset(); | 3168 web_bluetooth_service_.reset(); |
3160 } | 3169 } |
3161 | 3170 |
3162 } // namespace content | 3171 } // namespace content |
OLD | NEW |