OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 #if defined(ENABLE_WEBRTC) | 317 #if defined(ENABLE_WEBRTC) |
318 #include "chrome/browser/media/audio_debug_recordings_handler.h" | 318 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
319 #include "chrome/browser/media/webrtc/webrtc_event_log_handler.h" | 319 #include "chrome/browser/media/webrtc/webrtc_event_log_handler.h" |
320 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" | 320 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" |
321 #endif | 321 #endif |
322 | 322 |
323 #if defined(ENABLE_MEDIA_ROUTER) | 323 #if defined(ENABLE_MEDIA_ROUTER) |
324 #include "chrome/browser/media/router/media_router_feature.h" | 324 #include "chrome/browser/media/router/media_router_feature.h" |
325 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" | 325 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| 326 #include "chrome/browser/media/router/receiver_presentation_service_delegate_imp
l.h" |
326 #endif | 327 #endif |
327 | 328 |
328 #if defined(ENABLE_WAYLAND_SERVER) | 329 #if defined(ENABLE_WAYLAND_SERVER) |
329 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 330 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
330 #endif | 331 #endif |
331 | 332 |
332 #if defined(ENABLE_MOJO_MEDIA) | 333 #if defined(ENABLE_MOJO_MEDIA) |
333 #include "chrome/browser/media/output_protection_impl.h" | 334 #include "chrome/browser/media/output_protection_impl.h" |
334 #endif | 335 #endif |
335 | 336 |
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3002 Navigate(&nav_params); | 3003 Navigate(&nav_params); |
3003 callback.Run(nav_params.target_contents); | 3004 callback.Run(nav_params.target_contents); |
3004 #endif | 3005 #endif |
3005 } | 3006 } |
3006 | 3007 |
3007 content::PresentationServiceDelegate* | 3008 content::PresentationServiceDelegate* |
3008 ChromeContentBrowserClient::GetPresentationServiceDelegate( | 3009 ChromeContentBrowserClient::GetPresentationServiceDelegate( |
3009 content::WebContents* web_contents) { | 3010 content::WebContents* web_contents) { |
3010 #if defined(ENABLE_MEDIA_ROUTER) | 3011 #if defined(ENABLE_MEDIA_ROUTER) |
3011 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { | 3012 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { |
| 3013 // ReceiverPresentationServiceDelegateImpl are for WebContents created for |
| 3014 // offscreen presentations. The WebContents is from an incognito profile. |
| 3015 if (auto* impl = media_router::ReceiverPresentationServiceDelegateImpl:: |
| 3016 FromWebContents(web_contents)) { |
| 3017 DCHECK(web_contents->GetBrowserContext()->IsOffTheRecord()); |
| 3018 return impl; |
| 3019 } |
3012 return media_router::PresentationServiceDelegateImpl:: | 3020 return media_router::PresentationServiceDelegateImpl:: |
3013 GetOrCreateForWebContents(web_contents); | 3021 GetOrCreateForWebContents(web_contents); |
3014 } | 3022 } |
3015 #endif // defined(ENABLE_MEDIA_ROUTER) | 3023 #endif // defined(ENABLE_MEDIA_ROUTER) |
3016 return nullptr; | 3024 return nullptr; |
3017 } | 3025 } |
3018 | 3026 |
3019 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 3027 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
3020 const GURL& url) { | 3028 const GURL& url) { |
3021 if (url.is_valid()) { | 3029 if (url.is_valid()) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3186 if (channel <= kMaxDisableEncryptionChannel) { | 3194 if (channel <= kMaxDisableEncryptionChannel) { |
3187 static const char* const kWebRtcDevSwitchNames[] = { | 3195 static const char* const kWebRtcDevSwitchNames[] = { |
3188 switches::kDisableWebRtcEncryption, | 3196 switches::kDisableWebRtcEncryption, |
3189 }; | 3197 }; |
3190 to_command_line->CopySwitchesFrom(from_command_line, | 3198 to_command_line->CopySwitchesFrom(from_command_line, |
3191 kWebRtcDevSwitchNames, | 3199 kWebRtcDevSwitchNames, |
3192 arraysize(kWebRtcDevSwitchNames)); | 3200 arraysize(kWebRtcDevSwitchNames)); |
3193 } | 3201 } |
3194 } | 3202 } |
3195 #endif // defined(ENABLE_WEBRTC) | 3203 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |