Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2760403003: Remove enable_media_router. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 93dfff21e8bf4f23ed1a6c75efd39a2988821ad7..2ff1a6f23ca0aa23668e02b8ab93fcbe4b580e44 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -47,6 +47,9 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/font_family_cache.h"
+#include "chrome/browser/media/router/media_router_feature.h"
+#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
+#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h"
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/memory/chrome_memory_coordinator_delegate.h"
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
@@ -347,9 +350,9 @@
#include "extensions/common/switches.h"
#endif
-#if BUILDFLAG(ENABLE_EXTENSIONS) && defined(ENABLE_MEDIA_ROUTER)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/media/cast_transport_host_filter.h"
-#endif // BUILDFLAG(ENABLE_EXTENSIONS) && defined(ENABLE_MEDIA_ROUTER)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
#if BUILDFLAG(ENABLE_PLUGINS)
#include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h"
@@ -373,13 +376,7 @@
#include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h"
#endif
-#if defined(ENABLE_MEDIA_ROUTER)
-#include "chrome/browser/media/router/media_router_feature.h"
-#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
-#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h"
-#endif // defined(ENABLE_MEDIA_ROUTER)
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING) && defined(ENABLE_MEDIA_ROUTER)
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
#include "chrome/browser/media/cast_remoting_connector.h"
#endif
@@ -1214,7 +1211,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
int id = host->GetID();
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
host->AddFilter(new ChromeRenderMessageFilter(id, profile));
-#if BUILDFLAG(ENABLE_EXTENSIONS) && defined(ENABLE_MEDIA_ROUTER)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
host->AddFilter(new cast::CastTransportHostFilter);
#endif
#if BUILDFLAG(ENABLE_PRINTING)
@@ -3362,19 +3359,16 @@ void ChromeContentBrowserClient::OpenURL(
content::ControllerPresentationServiceDelegate*
ChromeContentBrowserClient::GetControllerPresentationServiceDelegate(
content::WebContents* web_contents) {
-#if defined(ENABLE_MEDIA_ROUTER)
if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) {
return media_router::PresentationServiceDelegateImpl::
GetOrCreateForWebContents(web_contents);
}
-#endif // defined(ENABLE_MEDIA_ROUTER)
return nullptr;
}
content::ReceiverPresentationServiceDelegate*
ChromeContentBrowserClient::GetReceiverPresentationServiceDelegate(
content::WebContents* web_contents) {
-#if defined(ENABLE_MEDIA_ROUTER)
if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) {
// ReceiverPresentationServiceDelegateImpl exists only for WebContents
// created for offscreen presentations. The WebContents must belong to
@@ -3385,7 +3379,6 @@ ChromeContentBrowserClient::GetReceiverPresentationServiceDelegate(
return impl;
}
}
-#endif // defined(ENABLE_MEDIA_ROUTER)
return nullptr;
}
@@ -3608,16 +3601,8 @@ void ChromeContentBrowserClient::CreateMediaRemoter(
content::RenderFrameHost* render_frame_host,
media::mojom::RemotingSourcePtr source,
media::mojom::RemoterRequest request) {
-#if defined(ENABLE_MEDIA_ROUTER)
CastRemotingConnector::CreateMediaRemoter(
render_frame_host, std::move(source), std::move(request));
-#else
- // Chrome's media remoting implementation depends on the Media Router
- // infrastructure to identify remote sinks and provide the user interface for
- // sink selection. In the case where the Media Router is not present, simply
- // drop the interface request. This will prevent code paths for media remoting
- // in the renderer process from activating.
-#endif
}
#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698