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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1306843003: CmaMediaPipelineClient to watch media pipeline status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return scoped_ptr<::media::AudioManagerFactory>(); 79 return scoped_ptr<::media::AudioManagerFactory>();
80 } 80 }
81 81
82 #if !defined(OS_ANDROID) 82 #if !defined(OS_ANDROID)
83 scoped_ptr<media::MediaPipelineBackend> 83 scoped_ptr<media::MediaPipelineBackend>
84 CastContentBrowserClient::CreateMediaPipelineBackend( 84 CastContentBrowserClient::CreateMediaPipelineBackend(
85 const media::MediaPipelineDeviceParams& params) { 85 const media::MediaPipelineDeviceParams& params) {
86 return make_scoped_ptr( 86 return make_scoped_ptr(
87 media::CastMediaShlib::CreateMediaPipelineBackend(params)); 87 media::CastMediaShlib::CreateMediaPipelineBackend(params));
88 } 88 }
89
90 void CastContentBrowserClient::OnMediaPipelineBackendCreate() {}
91
92 void CastContentBrowserClient::OnMediaPipelineBackendDestroy() {}
89 #endif 93 #endif
90 94
91 void CastContentBrowserClient::ProcessExiting() { 95 void CastContentBrowserClient::ProcessExiting() {
92 // Finalize CastMediaShlib on media thread to ensure it's not accessed 96 // Finalize CastMediaShlib on media thread to ensure it's not accessed
93 // after Finalize. 97 // after Finalize.
94 media::MediaMessageLoop::GetTaskRunner()->PostTask( 98 media::MediaMessageLoop::GetTaskRunner()->PostTask(
95 FROM_HERE, base::Bind(&media::CastMediaShlib::Finalize)); 99 FROM_HERE, base::Bind(&media::CastMediaShlib::Finalize));
96 } 100 }
97 101
98 void CastContentBrowserClient::SetMetricsClientId( 102 void CastContentBrowserClient::SetMetricsClientId(
(...skipping 13 matching lines...) Expand all
112 return parts; 116 return parts;
113 } 117 }
114 118
115 void CastContentBrowserClient::RenderProcessWillLaunch( 119 void CastContentBrowserClient::RenderProcessWillLaunch(
116 content::RenderProcessHost* host) { 120 content::RenderProcessHost* host) {
117 #if !defined(OS_ANDROID) 121 #if !defined(OS_ANDROID)
118 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter( 122 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter(
119 new media::CmaMessageFilterHost( 123 new media::CmaMessageFilterHost(
120 host->GetID(), 124 host->GetID(),
121 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, 125 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend,
126 base::Unretained(this)),
127 base::Bind(&CastContentBrowserClient::OnMediaPipelineBackendCreate,
128 base::Unretained(this)),
129 base::Bind(&CastContentBrowserClient::OnMediaPipelineBackendDestroy,
122 base::Unretained(this)))); 130 base::Unretained(this))));
123 host->AddFilter(cma_message_filter.get()); 131 host->AddFilter(cma_message_filter.get());
124 #endif // !defined(OS_ANDROID) 132 #endif // !defined(OS_ANDROID)
125 133
126 // Forcibly trigger I/O-thread URLRequestContext initialization before 134 // Forcibly trigger I/O-thread URLRequestContext initialization before
127 // getting HostResolver. 135 // getting HostResolver.
128 content::BrowserThread::PostTaskAndReplyWithResult( 136 content::BrowserThread::PostTaskAndReplyWithResult(
129 content::BrowserThread::IO, FROM_HERE, 137 content::BrowserThread::IO, FROM_HERE,
130 base::Bind(&net::URLRequestContextGetter::GetURLRequestContext, 138 base::Bind(&net::URLRequestContextGetter::GetURLRequestContext,
131 base::Unretained( 139 base::Unretained(
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 process_type, dumps_path, false /* upload */); 446 process_type, dumps_path, false /* upload */);
439 // StartUploaderThread() even though upload is diferred. 447 // StartUploaderThread() even though upload is diferred.
440 // Breakpad-related memory is freed in the uploader thread. 448 // Breakpad-related memory is freed in the uploader thread.
441 crash_handler->StartUploaderThread(); 449 crash_handler->StartUploaderThread();
442 return crash_handler; 450 return crash_handler;
443 } 451 }
444 #endif // !defined(OS_ANDROID) 452 #endif // !defined(OS_ANDROID)
445 453
446 } // namespace shell 454 } // namespace shell
447 } // namespace chromecast 455 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698