| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 #include "content/browser/media/android/media_player_renderer.h" | 118 #include "content/browser/media/android/media_player_renderer.h" |
| 119 #include "media/base/audio_renderer_sink.h" | 119 #include "media/base/audio_renderer_sink.h" |
| 120 #include "media/base/video_renderer_sink.h" | 120 #include "media/base/video_renderer_sink.h" |
| 121 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 121 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 #if defined(OS_MACOSX) | 124 #if defined(OS_MACOSX) |
| 125 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 125 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(ENABLE_WEBVR) |
| 128 #include "device/vr/vr_service_impl.h" // nogncheck | 129 #include "device/vr/vr_service_impl.h" // nogncheck |
| 130 #endif |
| 129 | 131 |
| 130 using base::TimeDelta; | 132 using base::TimeDelta; |
| 131 | 133 |
| 132 namespace content { | 134 namespace content { |
| 133 | 135 |
| 134 namespace { | 136 namespace { |
| 135 | 137 |
| 136 // The next value to use for the accessibility reset token. | 138 // The next value to use for the accessibility reset token. |
| 137 int g_next_accessibility_reset_token = 1; | 139 int g_next_accessibility_reset_token = 1; |
| 138 | 140 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 232 } |
| 231 } | 233 } |
| 232 | 234 |
| 233 const int process_id_; | 235 const int process_id_; |
| 234 const int routing_id_; | 236 const int routing_id_; |
| 235 | 237 |
| 236 DISALLOW_COPY_AND_ASSIGN(RemoterFactoryImpl); | 238 DISALLOW_COPY_AND_ASSIGN(RemoterFactoryImpl); |
| 237 }; | 239 }; |
| 238 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 240 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| 239 | 241 |
| 240 template <typename Interface> | |
| 241 void IgnoreInterfaceRequest(mojo::InterfaceRequest<Interface> request) { | |
| 242 // Intentionally ignore the interface request. | |
| 243 } | |
| 244 | |
| 245 } // namespace | 242 } // namespace |
| 246 | 243 |
| 247 // static | 244 // static |
| 248 RenderFrameHost* RenderFrameHost::FromID(int render_process_id, | 245 RenderFrameHost* RenderFrameHost::FromID(int render_process_id, |
| 249 int render_frame_id) { | 246 int render_frame_id) { |
| 250 return RenderFrameHostImpl::FromID(render_process_id, render_frame_id); | 247 return RenderFrameHostImpl::FromID(render_process_id, render_frame_id); |
| 251 } | 248 } |
| 252 | 249 |
| 253 #if defined(OS_ANDROID) | 250 #if defined(OS_ANDROID) |
| 254 // static | 251 // static |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2304 // associated RenderFrame. This is important for showing the correct security | 2301 // associated RenderFrame. This is important for showing the correct security |
| 2305 // state of the page and also honoring user override of bad certificates. | 2302 // state of the page and also honoring user override of bad certificates. |
| 2306 GetInterfaceRegistry()->AddInterface( | 2303 GetInterfaceRegistry()->AddInterface( |
| 2307 base::Bind(&WebSocketManager::CreateWebSocket, | 2304 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2308 process_->GetID(), | 2305 process_->GetID(), |
| 2309 routing_id_)); | 2306 routing_id_)); |
| 2310 | 2307 |
| 2311 #if defined(ENABLE_WEBVR) | 2308 #if defined(ENABLE_WEBVR) |
| 2312 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( | 2309 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( |
| 2313 base::Bind(&device::VRServiceImpl::Create)); | 2310 base::Bind(&device::VRServiceImpl::Create)); |
| 2314 #else | |
| 2315 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( | |
| 2316 base::Bind(&IgnoreInterfaceRequest<device::mojom::VRService>)); | |
| 2317 #endif | 2311 #endif |
| 2318 | |
| 2319 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { | 2312 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { |
| 2320 GetInterfaceRegistry()->AddInterface( | 2313 GetInterfaceRegistry()->AddInterface( |
| 2321 base::Bind(&device::SensorProviderImpl::Create, | 2314 base::Bind(&device::SensorProviderImpl::Create, |
| 2322 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), | 2315 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), |
| 2323 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 2316 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 2324 } | 2317 } |
| 2325 | 2318 |
| 2326 #if BUILDFLAG(ENABLE_WEBRTC) | 2319 #if BUILDFLAG(ENABLE_WEBRTC) |
| 2327 // BrowserMainLoop::GetInstance() may be null on unit tests. | 2320 // BrowserMainLoop::GetInstance() may be null on unit tests. |
| 2328 if (BrowserMainLoop::GetInstance()) { | 2321 if (BrowserMainLoop::GetInstance()) { |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3391 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3384 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3392 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3385 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3393 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3386 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3394 return NavigationHandleImpl::Create( | 3387 return NavigationHandleImpl::Create( |
| 3395 params.url, frame_tree_node_, is_renderer_initiated, | 3388 params.url, frame_tree_node_, is_renderer_initiated, |
| 3396 params.was_within_same_page, base::TimeTicks::Now(), | 3389 params.was_within_same_page, base::TimeTicks::Now(), |
| 3397 entry_id_for_data_nav, false); // started_from_context_menu | 3390 entry_id_for_data_nav, false); // started_from_context_menu |
| 3398 } | 3391 } |
| 3399 | 3392 |
| 3400 } // namespace content | 3393 } // namespace content |
| OLD | NEW |