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

Unified Diff: media/base/bind_to_loop.h.pump

Issue 65803002: Replace MessageLoopProxy with SingleThreadTaskRunner for media/filters/ + associated code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « media/base/bind_to_loop.h ('k') | media/filters/audio_decoder_selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/bind_to_loop.h.pump
diff --git a/media/base/bind_to_loop.h.pump b/media/base/bind_to_loop.h.pump
index 8490413eb1cc333cb2279712014f825c7487779c..41510c16236ba97bd3aedb4cca961f7aab3b118d 100644
--- a/media/base/bind_to_loop.h.pump
+++ b/media/base/bind_to_loop.h.pump
@@ -18,6 +18,7 @@ $var MAX_ARITY = 7
#include "base/bind.h"
#include "base/location.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
// This is a helper utility for base::Bind()ing callbacks on to particular
// MessageLoops. A typical use is when |a| (of class |A|) wants to hand a
@@ -62,12 +63,12 @@ $range ARG 1..ARITY
template <$for ARG , [[typename A$(ARG)]]>
struct TrampolineHelper<void($for ARG , [[A$(ARG)]])> {
static void Run(
- const scoped_refptr<base::MessageLoopProxy>& loop,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
const base::Callback<void($for ARG , [[A$(ARG)]])>& cb
$if ARITY != 0 [[, ]]
$for ARG , [[A$(ARG) a$(ARG)]]
) {
- loop->PostTask(FROM_HERE, base::Bind(cb
+ task_runner->PostTask(FROM_HERE, base::Bind(cb
$if ARITY != 0 [[, ]]
$for ARG , [[internal::TrampolineForward(a$(ARG))]]));
}
@@ -80,9 +81,9 @@ $for ARG , [[internal::TrampolineForward(a$(ARG))]]));
template<typename T>
static base::Callback<T> BindToLoop(
- const scoped_refptr<base::MessageLoopProxy>& loop,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
const base::Callback<T>& cb) {
- return base::Bind(&internal::TrampolineHelper<T>::Run, loop, cb);
+ return base::Bind(&internal::TrampolineHelper<T>::Run, task_runner, cb);
}
template<typename T>
« no previous file with comments | « media/base/bind_to_loop.h ('k') | media/filters/audio_decoder_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698