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

Side by Side Diff: cc/thread_impl.cc

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more test expectations 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
OLDNEW
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 #include "cc/thread_impl.h" 5 #include "cc/thread_impl.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 scoped_ptr<Thread> ThreadImpl::createForCurrentThread() 11 scoped_ptr<Thread> ThreadImpl::createForCurrentThread()
12 { 12 {
13 return scoped_ptr<Thread>(new ThreadImpl(base::MessageLoopProxy::current())) .Pass(); 13 return scoped_ptr<Thread>(new ThreadImpl(base::MessageLoopProxy::current())) .Pass();
14 } 14 }
15 15
16 scoped_ptr<Thread> ThreadImpl::createForDifferentThread(scoped_refptr<base::Mess ageLoopProxy> thread) 16 scoped_ptr<Thread> ThreadImpl::createForDifferentThread(scoped_refptr<base::Mess ageLoopProxy> thread)
17 { 17 {
18 return scoped_ptr<Thread>(new ThreadImpl(thread)).Pass(); 18 return scoped_ptr<Thread>(new ThreadImpl(thread)).Pass();
19 } 19 }
20 20
21 ThreadImpl::~ThreadImpl() 21 ThreadImpl::~ThreadImpl()
22 { 22 {
23 } 23 }
24 24
25 void ThreadImpl::postTask(base::Closure cb) 25 void ThreadImpl::postTask(base::Closure cb)
26 { 26 {
27 m_thread->PostTask(FROM_HERE, cb); 27 m_thread->PostTask(FROM_HERE, cb);
28 } 28 }
29 29
30 void ThreadImpl::postDelayedTask(base::Closure cb, long long delayMs) 30 void ThreadImpl::postDelayedTask(base::Closure cb, base::TimeDelta delay)
31 { 31 {
32 m_thread->PostDelayedTask(FROM_HERE, cb, base::TimeDelta::FromMilliseconds(d elayMs)); 32 m_thread->PostDelayedTask(FROM_HERE, cb, delay);
33 } 33 }
34 34
35 bool ThreadImpl::belongsToCurrentThread() const 35 bool ThreadImpl::belongsToCurrentThread() const
36 { 36 {
37 return m_thread->BelongsToCurrentThread(); 37 return m_thread->BelongsToCurrentThread();
38 } 38 }
39 39
40 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread) 40 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread)
41 : m_thread(thread) 41 : m_thread(thread)
42 { 42 {
43 } 43 }
44 44
45 } // namespace cc 45 } // namespace cc
OLDNEW
« cc/test/layer_tree_test_common.cc ('K') | « cc/thread_impl.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698