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

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

Issue 132163006: Rename media/base/bind_to_loop.h to media/base/bind_to_current_loop.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CALLBACK_HOLDER_H_ 5 #ifndef MEDIA_BASE_CALLBACK_HOLDER_H_
6 #define MEDIA_BASE_CALLBACK_HOLDER_H_ 6 #define MEDIA_BASE_CALLBACK_HOLDER_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
11 #include "media/base/bind_to_loop.h" 11 #include "media/base/bind_to_current_loop.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 // A helper class that can hold a callback from being fired. 15 // A helper class that can hold a callback from being fired.
16 template <typename CB> class CallbackHolder { 16 template <typename CB> class CallbackHolder {
17 public: 17 public:
18 CallbackHolder() : hold_(false) {} 18 CallbackHolder() : hold_(false) {}
19 19
20 ~CallbackHolder() { 20 ~CallbackHolder() {
21 // Make sure all callbacks are satisfied! 21 // Make sure all callbacks are satisfied!
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 private: 80 private:
81 bool hold_; 81 bool hold_;
82 CB original_cb_; 82 CB original_cb_;
83 base::Closure held_cb_; 83 base::Closure held_cb_;
84 }; 84 };
85 85
86 } // namespace media 86 } // namespace media
87 87
88 #endif // MEDIA_BASE_CALLBACK_HOLDER_H_ 88 #endif // MEDIA_BASE_CALLBACK_HOLDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698