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

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

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 188682 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
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/thread_proxy.h » ('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
(...skipping 13 matching lines...) Expand all
24 24
25 void FakeThread::runPendingTask() 25 void FakeThread::runPendingTask()
26 { 26 {
27 ASSERT_TRUE(m_pendingTask); 27 ASSERT_TRUE(m_pendingTask);
28 scoped_ptr<base::Closure> task = m_pendingTask.Pass(); 28 scoped_ptr<base::Closure> task = m_pendingTask.Pass();
29 task->Run(); 29 task->Run();
30 } 30 }
31 31
32 void FakeThread::PostTask(base::Closure cb) 32 void FakeThread::PostTask(base::Closure cb)
33 { 33 {
34 PostDelayedTask(cb, 0); 34 PostDelayedTask(cb, base::TimeDelta());
35 } 35 }
36 36
37 void FakeThread::PostDelayedTask(base::Closure cb, long long delay) 37 void FakeThread::PostDelayedTask(base::Closure cb, base::TimeDelta delay)
38 { 38 {
39 if (m_runPendingTaskOnOverwrite && hasPendingTask()) 39 if (m_runPendingTaskOnOverwrite && hasPendingTask())
40 runPendingTask(); 40 runPendingTask();
41 41
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; 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(cc::TimeSourceClient* client)
53 { 53 {
54 m_client = client; 54 m_client = client;
(...skipping 18 matching lines...) Expand all
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/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698