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

Side by Side Diff: chromecast/base/task_runner_impl.cc

Issue 1105803002: Exposes a shlib interface for media/audio path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment out streaming test until the default implementation is improved. Created 5 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // NOTE: This is included in the review for clarity, but this will be submitted
6 // in halliwell@'s review (1257013003), so this should be removed before
7 // submit.
8
9 #include "chromecast/base/task_runner_impl.h"
10
11 #include "base/bind.h"
12 #include "base/location.h"
13 #include "base/single_thread_task_runner.h"
14 #include "base/thread_task_runner_handle.h"
15
16 namespace chromecast {
17
18 TaskRunnerImpl::TaskRunnerImpl()
19 : runner_(base::ThreadTaskRunnerHandle::Get()) {
20 DCHECK(runner_.get());
21 }
22
23 TaskRunnerImpl::~TaskRunnerImpl() {
24 }
25
26 bool TaskRunnerImpl::BelongsToCurrentThread() {
27 return runner_->BelongsToCurrentThread();
28 }
29
30 bool TaskRunnerImpl::PostTask(Task* task, uint64_t delay_milliseconds) {
31 // TODO(halliwell): FROM_HERE is misleading, we should consider a macro for
32 // vendor backends to send the callsite info.
33 return runner_->PostDelayedTask(
34 FROM_HERE,
35 base::Bind(&Task::Run, base::Owned(task)),
36 base::TimeDelta::FromMilliseconds(delay_milliseconds));
37 }
38
39 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698