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