blob: 484c74465449bf39b23199b00006ee580f1862b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/base/callback.h"
namespace media {
AutoTaskRunner::~AutoTaskRunner() {
if (task_.get()) {
task_->Run();
}
}
AutoCallbackRunner::~AutoCallbackRunner() {
if (callback_.get()) {
callback_->Run();
}
}
Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) {
return new TaskToCallbackAdapter(task);
}
TaskToCallbackAdapter::~TaskToCallbackAdapter() {}
void TaskToCallbackAdapter::RunWithParams(const Tuple0& params) {
task_->Run();
}
TaskToCallbackAdapter::TaskToCallbackAdapter(Task* task) : task_(task) {}
} // namespace media
|