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

Side by Side Diff: chromecast/media/cma/base/media_task_runner.h

Issue 534893002: Introduce the concept of media task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 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 #ifndef CHROMECAST_MEDIA_CMA_BASE_MEDIA_TASK_RUNNER_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_MEDIA_TASK_RUNNER_H_
7
8 #include "base/callback.h"
9 #include "base/location.h"
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h"
13
14 namespace chromecast {
15 namespace media {
16
17 class MediaTaskRunner
18 : public base::RefCountedThreadSafe<MediaTaskRunner> {
19 public:
20 MediaTaskRunner();
21
22 // Post a task with the given media |timestamp|. If |timestamp| is equal to
23 // |kNoTimestamp()|, the task is scheduled right away.
24 // Returns true if the task may be run at some point in the future, and false
25 // if the task definitely will not be run.
26 virtual bool PostMediaTask(
27 const tracked_objects::Location& from_here,
28 const base::Closure& task,
29 base::TimeDelta timestamp) = 0;
xhwang 2014/09/03 17:06:39 How is media |timestamp| used to calculate the tim
damienv1 2014/09/03 22:01:03 1) Note added about how |timestamp| should be used
30
31 protected:
32 virtual ~MediaTaskRunner();
33 friend class base::RefCountedThreadSafe<MediaTaskRunner>;
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(MediaTaskRunner);
37 };
38
39 } // namespace media
40 } // namespace chromecast
41
42 #endif // CHROMECAST_MEDIA_CMA_BASE_MEDIA_TASK_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698