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

Side by Side Diff: cc/scheduler/time_source.h

Issue 327943006: Removing the TimeSource abstraction as it is not used anywhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master. Created 6 years, 6 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 | « cc/scheduler/delay_based_time_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2011 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 CC_SCHEDULER_TIME_SOURCE_H_
6 #define CC_SCHEDULER_TIME_SOURCE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h"
11
12 namespace cc {
13
14 class CC_EXPORT TimeSourceClient {
15 public:
16 virtual void OnTimerTick() = 0;
17
18 protected:
19 virtual ~TimeSourceClient() {}
20 };
21
22 // An generic interface for getting a reliably-ticking timesource of
23 // a specified rate.
24 //
25 // Be sure to call SetActive(false) before releasing your reference to the
26 // timer, or it will keep on ticking!
27 class CC_EXPORT TimeSource : public base::RefCounted<TimeSource> {
28 public:
29 virtual void SetClient(TimeSourceClient* client) = 0;
30
31 // If transitioning from not active to active, SetActive will return the
32 // timestamp of the most recenly missed tick that did not have OnTimerTick
33 // called.
34 virtual base::TimeTicks SetActive(bool active) = 0;
35
36 virtual bool Active() const = 0;
37 virtual void SetTimebaseAndInterval(base::TimeTicks timebase,
38 base::TimeDelta interval) = 0;
39 virtual base::TimeTicks LastTickTime() const = 0;
40 virtual base::TimeTicks NextTickTime() const = 0;
41
42 protected:
43 virtual ~TimeSource() {}
44
45 private:
46 friend class base::RefCounted<TimeSource>;
47 };
48
49 } // namespace cc
50
51 #endif // CC_SCHEDULER_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/scheduler/delay_based_time_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698