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_DELAY_BASED_TIME_SOURCE_H_ | 5 #ifndef CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ |
6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ | 6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 friend class base::RefCounted<DelayBasedTimeSource>; | 94 friend class base::RefCounted<DelayBasedTimeSource>; |
95 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource); | 95 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource); |
96 }; | 96 }; |
97 | 97 |
98 // DelayBasedTimeSource uses base::TimeTicks::HighResNow as its timebase. | 98 // DelayBasedTimeSource uses base::TimeTicks::HighResNow as its timebase. |
99 class DelayBasedTimeSourceHighRes : public DelayBasedTimeSource { | 99 class DelayBasedTimeSourceHighRes : public DelayBasedTimeSource { |
100 public: | 100 public: |
101 static scoped_refptr<DelayBasedTimeSourceHighRes> Create( | 101 static scoped_refptr<DelayBasedTimeSourceHighRes> Create( |
102 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner); | 102 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner); |
103 | 103 |
104 virtual base::TimeTicks Now() const OVERRIDE; | 104 virtual base::TimeTicks Now() const override; |
105 | 105 |
106 protected: | 106 protected: |
107 DelayBasedTimeSourceHighRes(base::TimeDelta interval, | 107 DelayBasedTimeSourceHighRes(base::TimeDelta interval, |
108 base::SingleThreadTaskRunner* task_runner); | 108 base::SingleThreadTaskRunner* task_runner); |
109 virtual ~DelayBasedTimeSourceHighRes(); | 109 virtual ~DelayBasedTimeSourceHighRes(); |
110 | 110 |
111 virtual std::string TypeString() const OVERRIDE; | 111 virtual std::string TypeString() const override; |
112 | 112 |
113 private: | 113 private: |
114 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes); | 114 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace cc | 117 } // namespace cc |
118 | 118 |
119 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ | 119 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ |
OLD | NEW |