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

Side by Side Diff: webkit/glue/webthread_impl.cc

Issue 8228025: Implement WebKitPlatformSupport::currentThread (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 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 | « webkit/glue/webthread_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // An implementation of WebThread in terms of base::MessageLoop and 5 // An implementation of WebThread in terms of base::MessageLoop and
6 // base::Thread 6 // base::Thread
7 7
8 #include "webkit/glue/webthread_impl.h" 8 #include "webkit/glue/webthread_impl.h"
9 9
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 28 matching lines...) Expand all
39 Task* task, int64 delay_ms) { 39 Task* task, int64 delay_ms) {
40 #endif 40 #endif
41 thread_->message_loop()->PostDelayedTask( 41 thread_->message_loop()->PostDelayedTask(
42 FROM_HERE, new TaskAdapter(task), delay_ms); 42 FROM_HERE, new TaskAdapter(task), delay_ms);
43 } 43 }
44 44
45 WebThreadImpl::~WebThreadImpl() { 45 WebThreadImpl::~WebThreadImpl() {
46 thread_->Stop(); 46 thread_->Stop();
47 } 47 }
48 48
49 WebThreadImplForMessageLoop::WebThreadImplForMessageLoop(
50 base::MessageLoopProxy* message_loop)
51 : message_loop_(message_loop) {
49 } 52 }
53
54 void WebThreadImplForMessageLoop::postTask(Task* task) {
55 message_loop_->PostTask(FROM_HERE, new TaskAdapter(task));
56 }
57
58 #ifdef WEBTHREAD_HAS_LONGLONG_CHANGE
darin (slow to review) 2011/10/12 04:42:20 i think this #ifdef was just a temporary guard to
piman 2011/10/12 19:53:52 Done. I removed it from existing code in this file
59 void WebThreadImplForMessageLoop::postDelayedTask(
60 Task* task, long long delay_ms) {
61 #else
62 void WebThreadImplForMessageLoop::postDelayedTask(
63 Task* task, int64 delay_ms) {
64 #endif
65 message_loop_->PostDelayedTask(FROM_HERE, new TaskAdapter(task), delay_ms);
66 }
67
68 WebThreadImplForMessageLoop::~WebThreadImplForMessageLoop() {
69 }
70
71 }
OLDNEW
« no previous file with comments | « webkit/glue/webthread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698