Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: cc/test/scheduler_test_common.cc

Issue 12623026: cc: Chromify TimeSource, DelayBasedTimeSource and test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back to doubles Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 void FakeTimeSourceClient::onTimerTick() 11 void FakeTimeSourceClient::OnTimerTick()
12 { 12 {
13 m_tickCalled = true; 13 m_tickCalled = true;
14 } 14 }
15 15
16 FakeThread::FakeThread() 16 FakeThread::FakeThread()
17 { 17 {
18 reset(); 18 reset();
19 } 19 }
20 20
21 FakeThread::~FakeThread() 21 FakeThread::~FakeThread()
(...skipping 20 matching lines...) Expand all
42 ASSERT_FALSE(hasPendingTask()); 42 ASSERT_FALSE(hasPendingTask());
43 m_pendingTask.reset(new base::Closure(cb)); 43 m_pendingTask.reset(new base::Closure(cb));
44 m_pendingTaskDelay = delay.InMilliseconds(); 44 m_pendingTaskDelay = delay.InMilliseconds();
45 } 45 }
46 46
47 bool FakeThread::BelongsToCurrentThread() const 47 bool FakeThread::BelongsToCurrentThread() const
48 { 48 {
49 return true; 49 return true;
50 } 50 }
51 51
52 void FakeTimeSource::setClient(cc::TimeSourceClient* client) 52 void FakeTimeSource::SetClient(TimeSourceClient* client)
53 { 53 {
54 m_client = client; 54 m_client = client;
55 } 55 }
56 56
57 void FakeTimeSource::setActive(bool b) 57 void FakeTimeSource::SetActive(bool b)
58 { 58 {
59 m_active = b; 59 m_active = b;
60 } 60 }
61 61
62 bool FakeTimeSource::active() const 62 bool FakeTimeSource::Active() const
63 { 63 {
64 return m_active; 64 return m_active;
65 } 65 }
66 66
67 base::TimeTicks FakeTimeSource::lastTickTime() 67 base::TimeTicks FakeTimeSource::LastTickTime()
68 { 68 {
69 return base::TimeTicks(); 69 return base::TimeTicks();
70 } 70 }
71 71
72 base::TimeTicks FakeTimeSource::nextTickTime() 72 base::TimeTicks FakeTimeSource::NextTickTime()
73 { 73 {
74 return base::TimeTicks(); 74 return base::TimeTicks();
75 } 75 }
76 76
77 base::TimeTicks FakeDelayBasedTimeSource::now() const 77 base::TimeTicks FakeDelayBasedTimeSource::Now() const
78 { 78 {
79 return m_now; 79 return m_now;
80 } 80 }
81 81
82 } // namespace cc 82 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698