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

Side by Side Diff: media/base/bind_to_current_loop.h

Issue 1965273003: Fix include path for moved thread_task_runner_handle.h header in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a1_move_task_runner_handle
Patch Set: merge up to r393009 Created 4 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 unified diff | Download patch
« no previous file with comments | « media/base/android/media_player_android.cc ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 #ifndef MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_ 5 #ifndef MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_
6 #define MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_ 6 #define MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 15
16 // This is a helper utility for base::Bind()ing callbacks to the current 16 // This is a helper utility for base::Bind()ing callbacks to the current
17 // MessageLoop. The typical use is when |a| (of class |A|) wants to hand a 17 // MessageLoop. The typical use is when |a| (of class |A|) wants to hand a
18 // callback such as base::Bind(&A::AMethod, a) to |b|, but needs to ensure that 18 // callback such as base::Bind(&A::AMethod, a) to |b|, but needs to ensure that
19 // when |b| executes the callback, it does so on |a|'s current MessageLoop. 19 // when |b| executes the callback, it does so on |a|'s current MessageLoop.
20 // 20 //
21 // Typical usage: request to be called back on the current thread: 21 // Typical usage: request to be called back on the current thread:
22 // other->StartAsyncProcessAndCallMeBack( 22 // other->StartAsyncProcessAndCallMeBack(
23 // media::BindToCurrentLoop(base::Bind(&MyClass::MyMethod, this))); 23 // media::BindToCurrentLoop(base::Bind(&MyClass::MyMethod, this)));
24 // 24 //
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 template<typename T> 65 template<typename T>
66 static base::Callback<T> BindToCurrentLoop( 66 static base::Callback<T> BindToCurrentLoop(
67 const base::Callback<T>& cb) { 67 const base::Callback<T>& cb) {
68 return base::Bind(&internal::TrampolineHelper<T>::Run, 68 return base::Bind(&internal::TrampolineHelper<T>::Run,
69 base::ThreadTaskRunnerHandle::Get(), cb); 69 base::ThreadTaskRunnerHandle::Get(), cb);
70 } 70 }
71 71
72 } // namespace media 72 } // namespace media
73 73
74 #endif // MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_ 74 #endif // MEDIA_BASE_BIND_TO_CURRENT_LOOP_H_
OLDNEW
« no previous file with comments | « media/base/android/media_player_android.cc ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698