| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 #include "content/browser/media/android/media_player_renderer.h" | 116 #include "content/browser/media/android/media_player_renderer.h" |
| 117 #include "media/base/audio_renderer_sink.h" | 117 #include "media/base/audio_renderer_sink.h" |
| 118 #include "media/base/video_renderer_sink.h" | 118 #include "media/base/video_renderer_sink.h" |
| 119 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 119 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 120 #endif | 120 #endif |
| 121 | 121 |
| 122 #if defined(OS_MACOSX) | 122 #if defined(OS_MACOSX) |
| 123 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 123 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 124 #endif | 124 #endif |
| 125 | 125 |
| 126 #if defined(ENABLE_WEBVR) | |
| 127 #include "device/vr/vr_service_impl.h" // nogncheck | |
| 128 #endif | |
| 129 | |
| 130 using base::TimeDelta; | 126 using base::TimeDelta; |
| 131 | 127 |
| 132 namespace content { | 128 namespace content { |
| 133 | 129 |
| 134 namespace { | 130 namespace { |
| 135 | 131 |
| 136 // The next value to use for the accessibility reset token. | 132 // The next value to use for the accessibility reset token. |
| 137 int g_next_accessibility_reset_token = 1; | 133 int g_next_accessibility_reset_token = 1; |
| 138 | 134 |
| 139 // The next value to use for the javascript callback id. | 135 // The next value to use for the javascript callback id. |
| (...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); | 2256 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); |
| 2261 | 2257 |
| 2262 // This is to support usage of WebSockets in cases in which there is an | 2258 // This is to support usage of WebSockets in cases in which there is an |
| 2263 // associated RenderFrame. This is important for showing the correct security | 2259 // associated RenderFrame. This is important for showing the correct security |
| 2264 // state of the page and also honoring user override of bad certificates. | 2260 // state of the page and also honoring user override of bad certificates. |
| 2265 GetInterfaceRegistry()->AddInterface( | 2261 GetInterfaceRegistry()->AddInterface( |
| 2266 base::Bind(&WebSocketManager::CreateWebSocket, | 2262 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2267 process_->GetID(), | 2263 process_->GetID(), |
| 2268 routing_id_)); | 2264 routing_id_)); |
| 2269 | 2265 |
| 2270 #if defined(ENABLE_WEBVR) | |
| 2271 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( | |
| 2272 base::Bind(&device::VRServiceImpl::Create)); | |
| 2273 #endif | |
| 2274 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { | 2266 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { |
| 2275 GetInterfaceRegistry()->AddInterface( | 2267 GetInterfaceRegistry()->AddInterface( |
| 2276 base::Bind(&device::SensorProviderImpl::Create, | 2268 base::Bind(&device::SensorProviderImpl::Create, |
| 2277 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), | 2269 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), |
| 2278 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 2270 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 2279 } | 2271 } |
| 2280 | 2272 |
| 2281 #if BUILDFLAG(ENABLE_WEBRTC) | 2273 #if BUILDFLAG(ENABLE_WEBRTC) |
| 2282 // BrowserMainLoop::GetInstance() may be null on unit tests. | 2274 // BrowserMainLoop::GetInstance() may be null on unit tests. |
| 2283 if (BrowserMainLoop::GetInstance()) { | 2275 if (BrowserMainLoop::GetInstance()) { |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3337 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3329 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3338 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3330 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3339 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3331 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3340 return NavigationHandleImpl::Create( | 3332 return NavigationHandleImpl::Create( |
| 3341 params.url, frame_tree_node_, is_renderer_initiated, | 3333 params.url, frame_tree_node_, is_renderer_initiated, |
| 3342 params.was_within_same_page, base::TimeTicks::Now(), | 3334 params.was_within_same_page, base::TimeTicks::Now(), |
| 3343 entry_id_for_data_nav, false); // started_from_context_menu | 3335 entry_id_for_data_nav, false); // started_from_context_menu |
| 3344 } | 3336 } |
| 3345 | 3337 |
| 3346 } // namespace content | 3338 } // namespace content |
| OLD | NEW |