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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1824723003: [chromecast] Pass media task runner to VideoPlaneController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed android build Created 4 years, 9 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_content_browser_client.h ('k') | chromecast/browser/cast_content_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index 66e08f582ab286c35dcdd43dbb9e951e7eae5608..ff159cb91c77f4ef526db41b73b355baef700892 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -31,8 +31,6 @@
#include "chromecast/browser/service/cast_service_simple.h"
#include "chromecast/browser/url_request_context_factory.h"
#include "chromecast/common/global_descriptors.h"
-#include "chromecast/media/base/media_message_loop.h"
-#include "chromecast/public/cast_media_shlib.h"
#include "chromecast/public/media/media_pipeline_backend.h"
#include "components/crash/content/app/breakpad_linux.h"
#include "components/crash/content/browser/crash_handler_host_linux.h"
@@ -81,8 +79,8 @@ static scoped_ptr<mojo::ShellClient> CreateCastMojoMediaApplication(
} // namespace
CastContentBrowserClient::CastContentBrowserClient()
- : url_request_context_factory_(new URLRequestContextFactory()) {
-}
+ : cast_browser_main_parts_(nullptr),
+ url_request_context_factory_(new URLRequestContextFactory()) {}
CastContentBrowserClient::~CastContentBrowserClient() {
content::BrowserThread::DeleteSoon(
@@ -101,7 +99,8 @@ void CastContentBrowserClient::PreCreateThreads() {
scoped_ptr<CastService> CastContentBrowserClient::CreateCastService(
content::BrowserContext* browser_context,
PrefService* pref_service,
- net::URLRequestContextGetter* request_context_getter) {
+ net::URLRequestContextGetter* request_context_getter,
+ media::VideoPlaneController* video_plane_controller) {
return make_scoped_ptr(new CastServiceSimple(browser_context, pref_service));
}
@@ -114,13 +113,6 @@ CastContentBrowserClient::GetCmaMediaPipelineClient() {
}
#endif // OS_ANDROID
-void CastContentBrowserClient::ProcessExiting() {
- // Finalize CastMediaShlib on media thread to ensure it's not accessed
- // after Finalize.
- GetMediaTaskRunner()->PostTask(FROM_HERE,
- base::Bind(&media::CastMediaShlib::Finalize));
-}
-
void CastContentBrowserClient::SetMetricsClientId(
const std::string& client_id) {
}
@@ -135,10 +127,11 @@ bool CastContentBrowserClient::EnableRemoteDebuggingImmediately() {
content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts(
const content::MainFunctionParams& parameters) {
- content::BrowserMainParts* parts =
+ DCHECK(!cast_browser_main_parts_);
+ cast_browser_main_parts_ =
new CastBrowserMainParts(parameters, url_request_context_factory_.get());
CastBrowserProcess::GetInstance()->SetCastContentBrowserClient(this);
- return parts;
+ return cast_browser_main_parts_;
}
void CastContentBrowserClient::RenderProcessWillLaunch(
@@ -163,8 +156,8 @@ void CastContentBrowserClient::RenderProcessWillLaunch(
scoped_refptr<base::SingleThreadTaskRunner>
CastContentBrowserClient::GetMediaTaskRunner() {
- // TODO(alokp): Obtain task runner from a local thread or mojo media app.
- return media::MediaMessageLoop::GetTaskRunner();
+ DCHECK(cast_browser_main_parts_);
+ return cast_browser_main_parts_->GetMediaTaskRunner();
}
#if !defined(OS_ANDROID)
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/browser/cast_content_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698