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

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

Issue 7062042: 1;2305;0cRevert 86971 - Move media library AutoTaskRunner to base and rename ScopedTaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/callback.h ('k') | media/filters/decoder_base.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/callback.h" 5 #include "media/base/callback.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 AutoTaskRunner::~AutoTaskRunner() {
10 if (task_.get()) {
11 task_->Run();
12 }
13 }
14
9 AutoCallbackRunner::~AutoCallbackRunner() { 15 AutoCallbackRunner::~AutoCallbackRunner() {
10 if (callback_.get()) { 16 if (callback_.get()) {
11 callback_->Run(); 17 callback_->Run();
12 } 18 }
13 } 19 }
14 20
15 Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) { 21 Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) {
16 return new TaskToCallbackAdapter(task); 22 return new TaskToCallbackAdapter(task);
17 } 23 }
18 24
19 TaskToCallbackAdapter::~TaskToCallbackAdapter() {} 25 TaskToCallbackAdapter::~TaskToCallbackAdapter() {}
20 26
21 void TaskToCallbackAdapter::RunWithParams(const Tuple0& params) { 27 void TaskToCallbackAdapter::RunWithParams(const Tuple0& params) {
22 task_->Run(); 28 task_->Run();
23 } 29 }
24 30
25 TaskToCallbackAdapter::TaskToCallbackAdapter(Task* task) : task_(task) {} 31 TaskToCallbackAdapter::TaskToCallbackAdapter(Task* task) : task_(task) {}
26 32
27 } // namespace media 33 } // namespace media
OLDNEW
« no previous file with comments | « media/base/callback.h ('k') | media/filters/decoder_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698