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

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

Issue 1731403002: media: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/serial_runner.h ('k') | media/base/text_track_config.h » ('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 #include "media/base/serial_runner.h" 5 #include "media/base/serial_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 22 matching lines...) Expand all
33 static void RunOnTaskRunner( 33 static void RunOnTaskRunner(
34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
35 const PipelineStatusCB& status_cb, 35 const PipelineStatusCB& status_cb,
36 PipelineStatus last_status) { 36 PipelineStatus last_status) {
37 // Force post to permit cancellation of a series in the scenario where all 37 // Force post to permit cancellation of a series in the scenario where all
38 // bound functions run on the same thread. 38 // bound functions run on the same thread.
39 task_runner->PostTask(FROM_HERE, base::Bind(status_cb, last_status)); 39 task_runner->PostTask(FROM_HERE, base::Bind(status_cb, last_status));
40 } 40 }
41 41
42 SerialRunner::Queue::Queue() {} 42 SerialRunner::Queue::Queue() {}
43 SerialRunner::Queue::Queue(const Queue& other) = default;
43 SerialRunner::Queue::~Queue() {} 44 SerialRunner::Queue::~Queue() {}
44 45
45 void SerialRunner::Queue::Push(const base::Closure& closure) { 46 void SerialRunner::Queue::Push(const base::Closure& closure) {
46 bound_fns_.push(base::Bind(&RunClosure, closure)); 47 bound_fns_.push(base::Bind(&RunClosure, closure));
47 } 48 }
48 49
49 void SerialRunner::Queue::Push( 50 void SerialRunner::Queue::Push(
50 const BoundClosure& bound_closure) { 51 const BoundClosure& bound_closure) {
51 bound_fns_.push(base::Bind(&RunBoundClosure, bound_closure)); 52 bound_fns_.push(base::Bind(&RunBoundClosure, bound_closure));
52 } 53 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 106
106 BoundPipelineStatusCB bound_fn = bound_fns_.Pop(); 107 BoundPipelineStatusCB bound_fn = bound_fns_.Pop();
107 bound_fn.Run(base::Bind( 108 bound_fn.Run(base::Bind(
108 &RunOnTaskRunner, 109 &RunOnTaskRunner,
109 task_runner_, 110 task_runner_,
110 base::Bind(&SerialRunner::RunNextInSeries, weak_factory_.GetWeakPtr()))); 111 base::Bind(&SerialRunner::RunNextInSeries, weak_factory_.GetWeakPtr())));
111 } 112 }
112 113
113 } // namespace media 114 } // namespace media
OLDNEW
« no previous file with comments | « media/base/serial_runner.h ('k') | media/base/text_track_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698