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

Side by Side Diff: cc/base/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: 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/base/thread_impl.h ('k') | cc/delay_based_time_source.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 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/base/thread_impl.h" 5 #include "cc/base/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 return scoped_ptr<Thread>( 12 return scoped_ptr<Thread>(
13 new ThreadImpl(base::MessageLoopProxy::current())).Pass(); 13 new ThreadImpl(base::MessageLoopProxy::current())).Pass();
14 } 14 }
15 15
16 scoped_ptr<Thread> ThreadImpl::CreateForDifferentThread( 16 scoped_ptr<Thread> ThreadImpl::CreateForDifferentThread(
17 scoped_refptr<base::MessageLoopProxy> thread) { 17 scoped_refptr<base::MessageLoopProxy> thread) {
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 void ThreadImpl::PostTask(base::Closure cb) { 23 void ThreadImpl::PostTask(base::Closure cb) {
24 thread_->PostTask(FROM_HERE, cb); 24 thread_->PostTask(FROM_HERE, cb);
25 } 25 }
26 26
27 void ThreadImpl::PostDelayedTask(base::Closure cb, long long delay_ms) { 27 void ThreadImpl::PostDelayedTask(base::Closure cb, base::TimeDelta delay) {
28 thread_->PostDelayedTask( 28 thread_->PostDelayedTask(FROM_HERE, cb, delay);
29 FROM_HERE, cb, base::TimeDelta::FromMilliseconds(delay_ms));
30 } 29 }
31 30
32 bool ThreadImpl::BelongsToCurrentThread() const { 31 bool ThreadImpl::BelongsToCurrentThread() const {
33 return thread_->BelongsToCurrentThread(); 32 return thread_->BelongsToCurrentThread();
34 } 33 }
35 34
36 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread) 35 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread)
37 : thread_(thread) {} 36 : thread_(thread) {}
38 37
39 } // namespace cc 38 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/thread_impl.h ('k') | cc/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698