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

Side by Side Diff: cc/time_source.h

Issue 11411024: cc: Switch time_source.h and timing_function* to Chrome coding style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 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 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 #ifndef CC_TIME_SOURCE_H_ 5 #ifndef CC_TIME_SOURCE_H_
6 #define CC_TIME_SOURCE_H_ 6 #define CC_TIME_SOURCE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class Thread; 14 class TimeSourceClient {
15 public:
16 virtual void onTimerTick() = 0;
15 17
16 class TimeSourceClient { 18 protected:
17 public: 19 virtual ~TimeSourceClient() {}
18 virtual void onTimerTick() = 0;
19
20 protected:
21 virtual ~TimeSourceClient() { }
22 }; 20 };
23 21
24 // An generic interface for getting a reliably-ticking timesource of 22 // An generic interface for getting a reliably-ticking timesource of
25 // a specified rate. 23 // a specified rate.
26 // 24 //
27 // Be sure to call setActive(false) before releasing your reference to the 25 // Be sure to call setActive(false) before releasing your reference to the
28 // timer, or it will keep on ticking! 26 // timer, or it will keep on ticking!
29 class CC_EXPORT TimeSource : public base::RefCounted<TimeSource> { 27 class CC_EXPORT TimeSource : public base::RefCounted<TimeSource> {
30 public: 28 public:
31 virtual void setClient(TimeSourceClient*) = 0; 29 virtual void setClient(TimeSourceClient*) = 0;
32 virtual void setActive(bool) = 0; 30 virtual void setActive(bool) = 0;
33 virtual bool active() const = 0; 31 virtual bool active() const = 0;
34 virtual void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelt a interval) = 0; 32 virtual void setTimebaseAndInterval(base::TimeTicks timebase,
35 virtual base::TimeTicks lastTickTime() = 0; 33 base::TimeDelta interval) = 0;
36 virtual base::TimeTicks nextTickTime() = 0; 34 virtual base::TimeTicks lastTickTime() = 0;
35 virtual base::TimeTicks nextTickTime() = 0;
37 36
38 protected: 37 protected:
39 virtual ~TimeSource() { } 38 virtual ~TimeSource() {}
40 39
41 private: 40 private:
42 friend class base::RefCounted<TimeSource>; 41 friend class base::RefCounted<TimeSource>;
43 }; 42 };
44 43
45 } 44 } // namespace cc
45
46 #endif // CC_TIME_SOURCE_H_ 46 #endif // CC_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/delay_based_time_source.h ('k') | cc/timing_function.h » ('j') | cc/timing_function.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698