| 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 CCDelayBasedTimeSource_h | 5 #ifndef CCDelayBasedTimeSource_h |
| 6 #define CCDelayBasedTimeSource_h | 6 #define CCDelayBasedTimeSource_h |
| 7 | 7 |
| 8 #include "CCTimeSource.h" | 8 #include "CCTimeSource.h" |
| 9 #include "CCTimer.h" | 9 #include "CCTimer.h" |
| 10 #include <wtf/PassRefPtr.h> | 10 #include <wtf/PassRefPtr.h> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // CCTimeSource implementation | 26 // CCTimeSource implementation |
| 27 virtual void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelt
a interval) OVERRIDE; | 27 virtual void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelt
a interval) OVERRIDE; |
| 28 | 28 |
| 29 virtual void setActive(bool) OVERRIDE; | 29 virtual void setActive(bool) OVERRIDE; |
| 30 virtual bool active() const OVERRIDE; | 30 virtual bool active() const OVERRIDE; |
| 31 | 31 |
| 32 // Get the last and next tick times. nextTimeTime() returns null when | 32 // Get the last and next tick times. nextTimeTime() returns null when |
| 33 // inactive. | 33 // inactive. |
| 34 virtual base::TimeTicks lastTickTime() OVERRIDE; | 34 virtual base::TimeTicks lastTickTime() OVERRIDE; |
| 35 virtual base::TimeTicks nextTickTime() OVERRIDE; | 35 virtual base::TimeTicks nextTickTime() OVERRIDE; |
| 36 virtual base::TimeDelta interval() OVERRIDE; |
| 36 | 37 |
| 37 // CCTimerClient implementation. | 38 // CCTimerClient implementation. |
| 38 virtual void onTimerFired() OVERRIDE; | 39 virtual void onTimerFired() OVERRIDE; |
| 39 | 40 |
| 40 // Virtual for testing. | 41 // Virtual for testing. |
| 41 virtual base::TimeTicks now() const; | 42 virtual base::TimeTicks now() const; |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 CCDelayBasedTimeSource(base::TimeDelta interval, CCThread*); | 45 CCDelayBasedTimeSource(base::TimeDelta interval, CCThread*); |
| 45 base::TimeTicks nextTickTarget(base::TimeTicks now); | 46 base::TimeTicks nextTickTarget(base::TimeTicks now); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 70 Parameters m_currentParameters; | 71 Parameters m_currentParameters; |
| 71 Parameters m_nextParameters; | 72 Parameters m_nextParameters; |
| 72 | 73 |
| 73 State m_state; | 74 State m_state; |
| 74 CCThread* m_thread; | 75 CCThread* m_thread; |
| 75 CCTimer m_timer; | 76 CCTimer m_timer; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } | 79 } |
| 79 #endif // CCDelayBasedTimeSource_h | 80 #endif // CCDelayBasedTimeSource_h |
| OLD | NEW |