OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "cc/test/scheduler_test_common.h" | 5 #include "cc/test/scheduler_test_common.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 if (run_pending_task_on_overwrite_ && HasPendingTask()) | 28 if (run_pending_task_on_overwrite_ && HasPendingTask()) |
29 RunPendingTask(); | 29 RunPendingTask(); |
30 | 30 |
31 ASSERT_FALSE(HasPendingTask()); | 31 ASSERT_FALSE(HasPendingTask()); |
32 pending_task_.reset(new base::Closure(cb)); | 32 pending_task_.reset(new base::Closure(cb)); |
33 pending_task_delay_ = delay.InMilliseconds(); | 33 pending_task_delay_ = delay.InMilliseconds(); |
34 } | 34 } |
35 | 35 |
36 bool FakeThread::BelongsToCurrentThread() const { return true; } | 36 bool FakeThread::BelongsToCurrentThread() const { return true; } |
37 | 37 |
38 void FakeTimeSource::SetClient(TimeSourceClient* client) { client_ = client; } | |
39 | |
40 void FakeTimeSource::SetActive(bool b) { active_ = b; } | |
41 | |
42 bool FakeTimeSource::Active() const { return active_; } | |
43 | |
44 base::TimeTicks FakeTimeSource::LastTickTime() { return base::TimeTicks(); } | |
45 | |
46 base::TimeTicks FakeTimeSource::NextTickTime() { return base::TimeTicks(); } | |
47 | |
48 base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; } | 38 base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; } |
49 | 39 |
50 } // namespace cc | 40 } // namespace cc |
OLD | NEW |