summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorgunsch <gunsch@chromium.org>2015-01-28 10:54:37 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-28 18:55:19 +0000
commit2ca77068898cd0e634033f9ceabc96ca21ea3df3 (patch)
tree1a8897b1f5361119d29cf4db4c8f19954c03829b /chromecast
parent97338dbd9d3367fec22d2f690156df85c0b2572b (diff)
downloadchromium_src-2ca77068898cd0e634033f9ceabc96ca21ea3df3.zip
chromium_src-2ca77068898cd0e634033f9ceabc96ca21ea3df3.tar.gz
chromium_src-2ca77068898cd0e634033f9ceabc96ca21ea3df3.tar.bz2
Chromecast: connect CastBrowserCdmFactory during startup.
R=lcwu@chromium.org,erickung@chromium.org BUG=408189 Review URL: https://codereview.chromium.org/886583002 Cr-Commit-Position: refs/heads/master@{#313552}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/browser/cast_browser_main_parts.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 9962db3..e7bcbc9 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -18,17 +18,20 @@
#include "chromecast/browser/cast_browser_context.h"
#include "chromecast/browser/cast_browser_process.h"
#include "chromecast/browser/devtools/remote_debugging_server.h"
+#include "chromecast/browser/media/cast_browser_cdm_factory.h"
#include "chromecast/browser/metrics/cast_metrics_prefs.h"
#include "chromecast/browser/metrics/cast_metrics_service_client.h"
#include "chromecast/browser/pref_service_helper.h"
#include "chromecast/browser/service/cast_service.h"
#include "chromecast/browser/url_request_context_factory.h"
#include "chromecast/common/cast_paths.h"
+#include "chromecast/common/chromecast_switches.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/net/network_change_notifier_cast.h"
#include "chromecast/net/network_change_notifier_factory_cast.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
+#include "media/base/browser_cdm_factory.h"
#include "media/base/media_switches.h"
#if defined(OS_ANDROID)
@@ -180,6 +183,12 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
cast_browser_process_->SetPrefService(
PrefServiceHelper::CreatePrefService(pref_registry.get()));
+#if !defined(OS_ANDROID)
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kEnableCmaMediaPipeline))
+ ::media::SetBrowserCdmFactory(new media::CastBrowserCdmFactory);
+#endif // !defined(OS_ANDROID)
+
url_request_context_factory_->InitializeOnUIThread();
cast_browser_process_->SetBrowserContext(