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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1149293008: [MediaRouter] Adds GetPresentationServiceDelegate impl to ChromeContentBrowserClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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 117a7d435a5e0a3d82caaf81721844e3e148ff5e..2fad29b93d0031f156c48746a227c3fa5869277b 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -240,6 +240,10 @@
#include "chrome/browser/media/webrtc_logging_handler_host.h"
#endif
+#if defined(ENABLE_MEDIA_ROUTER)
+#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
+#endif
+
using base::FileDescriptor;
using blink::WebWindowFeatures;
using content::AccessTokenStore;
@@ -2361,6 +2365,20 @@ void ChromeContentBrowserClient::OpenURL(
#endif
}
+content::PresentationServiceDelegate*
+ChromeContentBrowserClient::GetPresentationServiceDelegate(
+ content::WebContents* web_contents) {
+#if defined(ENABLE_MEDIA_ROUTER)
+ if (switches::MediaRouterEnabled()) {
+ return media_router::PresentationServiceDelegateImpl::
+ GetOrCreateForWebContents(web_contents);
+ }
+ return nullptr;
+#else
+ return nullptr;
+#endif
mark a. foltz 2015/06/05 22:22:19 Remove duplicate line by putting #endif before ret
mark a. foltz 2015/06/05 22:22:19 #endif // defined(ENABLE_MEDIA_ROUTER)
haibinlu 2015/06/06 02:37:33 Done.
haibinlu 2015/06/06 02:37:33 #if is very close by.
+}
+
void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric,
const GURL& url) {
if (url.is_valid()) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/media/router/presentation_service_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698