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

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

Issue 275673002: Remove completion callbacks from AudioRenderer::Play/Pause(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/base/serial_runner.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERIAL_RUNNER_H_ 5 #ifndef MEDIA_BASE_SERIAL_RUNNER_H_
6 #define MEDIA_BASE_SERIAL_RUNNER_H_ 6 #define MEDIA_BASE_SERIAL_RUNNER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 typedef base::Callback<void(const base::Closure&)> BoundClosure; 28 typedef base::Callback<void(const base::Closure&)> BoundClosure;
29 typedef base::Callback<void(const PipelineStatusCB&)> BoundPipelineStatusCB; 29 typedef base::Callback<void(const PipelineStatusCB&)> BoundPipelineStatusCB;
30 30
31 // Serial queue of bound functions to run. 31 // Serial queue of bound functions to run.
32 class MEDIA_EXPORT Queue { 32 class MEDIA_EXPORT Queue {
33 public: 33 public:
34 Queue(); 34 Queue();
35 ~Queue(); 35 ~Queue();
36 36
37 void Push(const base::Closure& closure);
37 void Push(const BoundClosure& bound_fn); 38 void Push(const BoundClosure& bound_fn);
38 void Push(const BoundPipelineStatusCB& bound_fn); 39 void Push(const BoundPipelineStatusCB& bound_fn);
39 40
40 private: 41 private:
41 friend class SerialRunner; 42 friend class SerialRunner;
42 43
43 BoundPipelineStatusCB Pop(); 44 BoundPipelineStatusCB Pop();
44 bool empty(); 45 bool empty();
45 46
46 std::queue<BoundPipelineStatusCB> bound_fns_; 47 std::queue<BoundPipelineStatusCB> bound_fns_;
(...skipping 30 matching lines...) Expand all
77 78
78 // NOTE: Weak pointers must be invalidated before all other member variables. 79 // NOTE: Weak pointers must be invalidated before all other member variables.
79 base::WeakPtrFactory<SerialRunner> weak_factory_; 80 base::WeakPtrFactory<SerialRunner> weak_factory_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(SerialRunner); 82 DISALLOW_COPY_AND_ASSIGN(SerialRunner);
82 }; 83 };
83 84
84 } // namespace media 85 } // namespace media
85 86
86 #endif // MEDIA_BASE_SERIAL_RUNNER_H_ 87 #endif // MEDIA_BASE_SERIAL_RUNNER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/base/serial_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698