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

Unified Diff: chromecast/renderer/media/video_pipeline_proxy.cc

Issue 1142513004: Chromecast: MessageLoopProxy cleanup --> SingleThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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/renderer/media/video_pipeline_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/media/video_pipeline_proxy.cc
diff --git a/chromecast/renderer/media/video_pipeline_proxy.cc b/chromecast/renderer/media/video_pipeline_proxy.cc
index 6c924cd4e2e4e39e01547a40273e1bf8bc16d234..40d4fd63d0315295165bc3d3baed00894c955114 100644
--- a/chromecast/renderer/media/video_pipeline_proxy.cc
+++ b/chromecast/renderer/media/video_pipeline_proxy.cc
@@ -187,22 +187,20 @@ void VideoPipelineProxyInternal::OnStateChanged(
base::ResetAndReturn(&status_cb_).Run(status);
}
-
-// A macro runs current member function on |io_message_loop_proxy_| thread.
-#define FORWARD_ON_IO_THREAD(param_fn, ...) \
- io_message_loop_proxy_->PostTask( \
- FROM_HERE, \
- base::Bind(&VideoPipelineProxyInternal::param_fn, \
- base::Unretained(proxy_.get()), ##__VA_ARGS__))
+// A macro runs current member function on |io_task_runner_| thread.
+#define FORWARD_ON_IO_THREAD(param_fn, ...) \
+ io_task_runner_->PostTask( \
+ FROM_HERE, base::Bind(&VideoPipelineProxyInternal::param_fn, \
+ base::Unretained(proxy_.get()), ##__VA_ARGS__))
VideoPipelineProxy::VideoPipelineProxy(
- scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<MediaChannelProxy> media_channel_proxy)
- : io_message_loop_proxy_(io_message_loop_proxy),
+ : io_task_runner_(io_task_runner),
proxy_(new VideoPipelineProxyInternal(media_channel_proxy)),
video_streamer_(new AvStreamerProxy()),
weak_factory_(this) {
- DCHECK(io_message_loop_proxy_.get());
+ DCHECK(io_task_runner_.get());
weak_this_ = weak_factory_.GetWeakPtr();
thread_checker_.DetachFromThread();
}
@@ -210,7 +208,7 @@ VideoPipelineProxy::VideoPipelineProxy(
VideoPipelineProxy::~VideoPipelineProxy() {
DCHECK(thread_checker_.CalledOnValidThread());
// Release the underlying object on the right thread.
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&VideoPipelineProxyInternal::Release, base::Passed(&proxy_)));
}
« no previous file with comments | « chromecast/renderer/media/video_pipeline_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698