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_TEST_SCHEDULER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_ |
6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ | 6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 ~TestSyntheticBeginFrameSource() override; | 141 ~TestSyntheticBeginFrameSource() override; |
142 | 142 |
143 static scoped_ptr<TestSyntheticBeginFrameSource> Create( | 143 static scoped_ptr<TestSyntheticBeginFrameSource> Create( |
144 base::SimpleTestTickClock* now_src, | 144 base::SimpleTestTickClock* now_src, |
145 OrderedSimpleTaskRunner* task_runner, | 145 OrderedSimpleTaskRunner* task_runner, |
146 base::TimeDelta initial_interval) { | 146 base::TimeDelta initial_interval) { |
147 scoped_ptr<TestDelayBasedTimeSource> time_source = | 147 scoped_ptr<TestDelayBasedTimeSource> time_source = |
148 TestDelayBasedTimeSource::Create(now_src, initial_interval, | 148 TestDelayBasedTimeSource::Create(now_src, initial_interval, |
149 task_runner); | 149 task_runner); |
150 return make_scoped_ptr( | 150 return make_scoped_ptr( |
151 new TestSyntheticBeginFrameSource(time_source.Pass())); | 151 new TestSyntheticBeginFrameSource(task_runner, time_source.Pass())); |
152 } | 152 } |
153 | 153 |
154 protected: | 154 protected: |
155 explicit TestSyntheticBeginFrameSource( | 155 explicit TestSyntheticBeginFrameSource( |
| 156 OrderedSimpleTaskRunner* task_runner, |
156 scoped_ptr<DelayBasedTimeSource> time_source); | 157 scoped_ptr<DelayBasedTimeSource> time_source); |
157 | 158 |
158 private: | 159 private: |
159 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); | 160 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); |
160 }; | 161 }; |
161 | 162 |
162 class TestScheduler : public Scheduler { | 163 class TestScheduler : public Scheduler { |
163 public: | 164 public: |
164 static scoped_ptr<TestScheduler> Create( | 165 static scoped_ptr<TestScheduler> Create( |
165 base::SimpleTestTickClock* now_src, | 166 base::SimpleTestTickClock* now_src, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 203 |
203 // Not owned. | 204 // Not owned. |
204 base::SimpleTestTickClock* now_src_; | 205 base::SimpleTestTickClock* now_src_; |
205 | 206 |
206 DISALLOW_COPY_AND_ASSIGN(TestScheduler); | 207 DISALLOW_COPY_AND_ASSIGN(TestScheduler); |
207 }; | 208 }; |
208 | 209 |
209 } // namespace cc | 210 } // namespace cc |
210 | 211 |
211 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 212 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |