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

Unified Diff: media/video/capture/video_capture_proxy.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: media/video/capture/video_capture_proxy.cc
diff --git a/media/video/capture/video_capture_proxy.cc b/media/video/capture/video_capture_proxy.cc
index bbbd6108fcaa1cf9e5a20b553ffa07ee49e542f5..01cc003916e99f0f131b9f300a68d29f460842b6 100644
--- a/media/video/capture/video_capture_proxy.cc
+++ b/media/video/capture/video_capture_proxy.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
namespace {
@@ -26,16 +26,16 @@ namespace media {
VideoCaptureHandlerProxy::VideoCaptureHandlerProxy(
VideoCapture::EventHandler* proxied,
- scoped_refptr<base::MessageLoopProxy> main_message_loop)
+ const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner)
: proxied_(proxied),
- main_message_loop_(main_message_loop) {
+ main_task_runner_(main_task_runner) {
}
VideoCaptureHandlerProxy::~VideoCaptureHandlerProxy() {
}
void VideoCaptureHandlerProxy::OnStarted(VideoCapture* capture) {
- main_message_loop_->PostTask(FROM_HERE, base::Bind(
+ main_task_runner_->PostTask(FROM_HERE, base::Bind(
&VideoCaptureHandlerProxy::OnStartedOnMainThread,
base::Unretained(this),
capture,
@@ -43,7 +43,7 @@ void VideoCaptureHandlerProxy::OnStarted(VideoCapture* capture) {
}
void VideoCaptureHandlerProxy::OnStopped(VideoCapture* capture) {
- main_message_loop_->PostTask(FROM_HERE, base::Bind(
+ main_task_runner_->PostTask(FROM_HERE, base::Bind(
&VideoCaptureHandlerProxy::OnStoppedOnMainThread,
base::Unretained(this),
capture,
@@ -51,7 +51,7 @@ void VideoCaptureHandlerProxy::OnStopped(VideoCapture* capture) {
}
void VideoCaptureHandlerProxy::OnPaused(VideoCapture* capture) {
- main_message_loop_->PostTask(FROM_HERE, base::Bind(
+ main_task_runner_->PostTask(FROM_HERE, base::Bind(
&VideoCaptureHandlerProxy::OnPausedOnMainThread,
base::Unretained(this),
capture,
@@ -59,7 +59,7 @@ void VideoCaptureHandlerProxy::OnPaused(VideoCapture* capture) {
}
void VideoCaptureHandlerProxy::OnError(VideoCapture* capture, int error_code) {
- main_message_loop_->PostTask(FROM_HERE, base::Bind(
+ main_task_runner_->PostTask(FROM_HERE, base::Bind(
&VideoCaptureHandlerProxy::OnErrorOnMainThread,
base::Unretained(this),
capture,
@@ -68,7 +68,7 @@ void VideoCaptureHandlerProxy::OnError(VideoCapture* capture, int error_code) {
}
void VideoCaptureHandlerProxy::OnRemoved(VideoCapture* capture) {
- main_message_loop_->PostTask(FROM_HERE, base::Bind(
+ main_task_runner_->PostTask(FROM_HERE, base::Bind(
&VideoCaptureHandlerProxy::OnRemovedOnMainThread,
base::Unretained(this),
capture,
@@ -78,7 +78,7 @@ void VideoCaptureHandlerProxy::OnRemoved(VideoCapture* capture) {
void VideoCaptureHandlerProxy::OnFrameReady(
VideoCapture* capture,
const scoped_refptr<VideoFrame>& frame) {
- main_message_loop_->PostTask(
+ main_task_runner_->PostTask(
FROM_HERE,
base::Bind(&VideoCaptureHandlerProxy::OnFrameReadyOnMainThread,
base::Unretained(this),
« media/audio/scoped_task_runner_observer.h ('K') | « media/video/capture/video_capture_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698