| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "cc/base/thread.h" | |
| 12 #include "cc/scheduler/delay_based_time_source.h" | 11 #include "cc/scheduler/delay_based_time_source.h" |
| 13 #include "cc/scheduler/frame_rate_controller.h" | 12 #include "cc/scheduler/frame_rate_controller.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 14 |
| 16 namespace cc { | 15 namespace cc { |
| 17 | 16 |
| 18 class FakeTimeSourceClient : public cc::TimeSourceClient { | 17 class FakeTimeSourceClient : public cc::TimeSourceClient { |
| 19 public: | 18 public: |
| 20 FakeTimeSourceClient() { Reset(); } | 19 FakeTimeSourceClient() { Reset(); } |
| 21 void Reset() { tick_called_ = false; } | 20 void Reset() { tick_called_ = false; } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 public: | 81 public: |
| 83 explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) | 82 explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) |
| 84 : cc::FrameRateController(timer) {} | 83 : cc::FrameRateController(timer) {} |
| 85 | 84 |
| 86 int NumFramesPending() const { return num_frames_pending_; } | 85 int NumFramesPending() const { return num_frames_pending_; } |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 } // namespace cc | 88 } // namespace cc |
| 90 | 89 |
| 91 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 90 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
| OLD | NEW |