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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 #if defined(ENABLE_WEBRTC) | 299 #if defined(ENABLE_WEBRTC) |
300 #include "chrome/browser/media/audio_debug_recordings_handler.h" | 300 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
301 #include "chrome/browser/media/webrtc_event_log_handler.h" | 301 #include "chrome/browser/media/webrtc_event_log_handler.h" |
302 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 302 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
303 #endif | 303 #endif |
304 | 304 |
305 #if defined(ENABLE_MEDIA_ROUTER) | 305 #if defined(ENABLE_MEDIA_ROUTER) |
306 #include "chrome/browser/media/router/media_router_feature.h" | 306 #include "chrome/browser/media/router/media_router_feature.h" |
307 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" | 307 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| 308 #include "chrome/browser/media/router/receiver_presentation_service_delegate_imp
l.h" |
308 #endif | 309 #endif |
309 | 310 |
310 #if defined(ENABLE_WAYLAND_SERVER) | 311 #if defined(ENABLE_WAYLAND_SERVER) |
311 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 312 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
312 #endif | 313 #endif |
313 | 314 |
314 #if defined(ENABLE_MOJO_MEDIA) | 315 #if defined(ENABLE_MOJO_MEDIA) |
315 #include "chrome/browser/media/output_protection_impl.h" | 316 #include "chrome/browser/media/output_protection_impl.h" |
316 #endif | 317 #endif |
317 | 318 |
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2822 Navigate(&nav_params); | 2823 Navigate(&nav_params); |
2823 callback.Run(nav_params.target_contents); | 2824 callback.Run(nav_params.target_contents); |
2824 #endif | 2825 #endif |
2825 } | 2826 } |
2826 | 2827 |
2827 content::PresentationServiceDelegate* | 2828 content::PresentationServiceDelegate* |
2828 ChromeContentBrowserClient::GetPresentationServiceDelegate( | 2829 ChromeContentBrowserClient::GetPresentationServiceDelegate( |
2829 content::WebContents* web_contents) { | 2830 content::WebContents* web_contents) { |
2830 #if defined(ENABLE_MEDIA_ROUTER) | 2831 #if defined(ENABLE_MEDIA_ROUTER) |
2831 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { | 2832 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { |
| 2833 // ReceiverPresentationServiceDelegateImpl are for WebContents created for |
| 2834 // offscreen presentations. The WebContents is from an incognito profile. |
| 2835 if (auto* impl = media_router::ReceiverPresentationServiceDelegateImpl:: |
| 2836 FromWebContents(web_contents)) { |
| 2837 DCHECK(web_contents->GetBrowserContext()->IsOffTheRecord()); |
| 2838 return impl; |
| 2839 } |
2832 return media_router::PresentationServiceDelegateImpl:: | 2840 return media_router::PresentationServiceDelegateImpl:: |
2833 GetOrCreateForWebContents(web_contents); | 2841 GetOrCreateForWebContents(web_contents); |
2834 } | 2842 } |
2835 #endif // defined(ENABLE_MEDIA_ROUTER) | 2843 #endif // defined(ENABLE_MEDIA_ROUTER) |
2836 return nullptr; | 2844 return nullptr; |
2837 } | 2845 } |
2838 | 2846 |
2839 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 2847 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
2840 const GURL& url) { | 2848 const GURL& url) { |
2841 if (url.is_valid()) { | 2849 if (url.is_valid()) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2958 if (channel <= kMaxDisableEncryptionChannel) { | 2966 if (channel <= kMaxDisableEncryptionChannel) { |
2959 static const char* const kWebRtcDevSwitchNames[] = { | 2967 static const char* const kWebRtcDevSwitchNames[] = { |
2960 switches::kDisableWebRtcEncryption, | 2968 switches::kDisableWebRtcEncryption, |
2961 }; | 2969 }; |
2962 to_command_line->CopySwitchesFrom(from_command_line, | 2970 to_command_line->CopySwitchesFrom(from_command_line, |
2963 kWebRtcDevSwitchNames, | 2971 kWebRtcDevSwitchNames, |
2964 arraysize(kWebRtcDevSwitchNames)); | 2972 arraysize(kWebRtcDevSwitchNames)); |
2965 } | 2973 } |
2966 } | 2974 } |
2967 #endif // defined(ENABLE_WEBRTC) | 2975 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |