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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1916973004: [chromecast] Delete MediaMessageLoop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « chromecast/browser/cast_browser_main_parts.h ('k') | chromecast/media/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 970254bdab5edf4765a23203af936304e550a384..5a076bbb59cf1747fa8bc431c47c2c8c482f7191 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -17,6 +17,7 @@
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
+#include "base/threading/thread.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
#include "chromecast/base/cast_constants.h"
@@ -38,7 +39,6 @@
#include "chromecast/chromecast_features.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/media/base/key_systems_common.h"
-#include "chromecast/media/base/media_message_loop.h"
#include "chromecast/media/base/media_resource_tracker.h"
#include "chromecast/media/base/video_plane_controller.h"
#include "chromecast/media/cma/backend/media_pipeline_backend_manager.h"
@@ -260,9 +260,16 @@ CastBrowserMainParts::~CastBrowserMainParts() {
}
scoped_refptr<base::SingleThreadTaskRunner>
-CastBrowserMainParts::GetMediaTaskRunner() const {
- // TODO(alokp): Obtain task runner from a local thread or mojo media app.
- return media::MediaMessageLoop::GetTaskRunner();
+CastBrowserMainParts::GetMediaTaskRunner() {
+#if defined(OS_ANDROID)
halliwell 2016/04/26 19:08:36 NOTREACHED?
alokp 2016/04/26 20:05:44 I am not sure if this is called on Android or not.
halliwell 2016/04/26 20:10:26 That's true, it could be called when constructing
+ return nullptr;
+#else
+ if (!media_thread_) {
+ media_thread_.reset(new base::Thread("CmaThread"));
halliwell 2016/04/26 19:08:36 Should we call it just "MediaThread" now?
alokp 2016/04/26 20:05:44 How about CastMediaThread?
halliwell 2016/04/26 20:10:26 sgtm
+ CHECK(media_thread_->Start());
+ }
+ return media_thread_->task_runner();
+#endif
}
#if !defined(OS_ANDROID)
« no previous file with comments | « chromecast/browser/cast_browser_main_parts.h ('k') | chromecast/media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698