| OLD | NEW |
| 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_SCHEDULER_TIME_SOURCE_H_ | 5 #ifndef CC_SCHEDULER_TIME_SOURCE_H_ |
| 6 #define CC_SCHEDULER_TIME_SOURCE_H_ | 6 #define CC_SCHEDULER_TIME_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 virtual void SetClient(TimeSourceClient* client) = 0; | 29 virtual void SetClient(TimeSourceClient* client) = 0; |
| 30 | 30 |
| 31 // If transitioning from not active to active, SetActive will return the | 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 | 32 // timestamp of the most recenly missed tick that did not have OnTimerTick |
| 33 // called. | 33 // called. |
| 34 virtual base::TimeTicks SetActive(bool active) = 0; | 34 virtual base::TimeTicks SetActive(bool active) = 0; |
| 35 | 35 |
| 36 virtual bool Active() const = 0; | 36 virtual bool Active() const = 0; |
| 37 virtual void SetTimebaseAndInterval(base::TimeTicks timebase, | 37 virtual void SetTimebaseAndInterval(base::TimeTicks timebase, |
| 38 base::TimeDelta interval) = 0; | 38 base::TimeDelta interval) = 0; |
| 39 virtual base::TimeTicks LastTickTime() = 0; | 39 virtual base::TimeTicks LastTickTime() const = 0; |
| 40 virtual base::TimeTicks NextTickTime() = 0; | 40 virtual base::TimeTicks NextTickTime() const = 0; |
| 41 | 41 |
| 42 protected: | 42 protected: |
| 43 virtual ~TimeSource() {} | 43 virtual ~TimeSource() {} |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 friend class base::RefCounted<TimeSource>; | 46 friend class base::RefCounted<TimeSource>; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace cc | 49 } // namespace cc |
| 50 | 50 |
| 51 #endif // CC_SCHEDULER_TIME_SOURCE_H_ | 51 #endif // CC_SCHEDULER_TIME_SOURCE_H_ |
| OLD | NEW |