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

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

Issue 9167034: Add support for Run + Quit to WebKit::WebThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update with MessageLoop-agnostic API names Created 8 years, 11 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 | « no previous file | webkit/glue/webthread_impl.h » ('j') | webkit/glue/webthread_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "webkit/glue/webkitplatformsupport_impl.h" 5 #include "webkit/glue/webkitplatformsupport_impl.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <malloc.h> 8 #include <malloc.h>
9 #endif 9 #endif
10 10
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 WebKit::WebThread* WebKitPlatformSupportImpl::createThread(const char* name) { 552 WebKit::WebThread* WebKitPlatformSupportImpl::createThread(const char* name) {
553 return new WebThreadImpl(name); 553 return new WebThreadImpl(name);
554 } 554 }
555 555
556 WebKit::WebThread* WebKitPlatformSupportImpl::currentThread() { 556 WebKit::WebThread* WebKitPlatformSupportImpl::currentThread() {
557 WebThreadImplForMessageLoop* thread = 557 WebThreadImplForMessageLoop* thread =
558 static_cast<WebThreadImplForMessageLoop*>(current_thread_slot_.Get()); 558 static_cast<WebThreadImplForMessageLoop*>(current_thread_slot_.Get());
559 if (thread) 559 if (thread)
560 return (thread); 560 return (thread);
561 561
562 scoped_refptr<base::MessageLoopProxy> message_loop = 562 MessageLoop* message_loop = MessageLoop::current();
563 base::MessageLoopProxy::current();
564 if (!message_loop) 563 if (!message_loop)
565 return NULL; 564 return NULL;
566 565
567 thread = new WebThreadImplForMessageLoop(message_loop); 566 thread = new WebThreadImplForMessageLoop(
567 message_loop, base::PlatformThread::CurrentId());
568 current_thread_slot_.Set(thread); 568 current_thread_slot_.Set(thread);
569 return thread; 569 return thread;
570 } 570 }
571 571
572 base::PlatformFile WebKitPlatformSupportImpl::databaseOpenFile( 572 base::PlatformFile WebKitPlatformSupportImpl::databaseOpenFile(
573 const WebKit::WebString& vfs_file_name, int desired_flags) { 573 const WebKit::WebString& vfs_file_name, int desired_flags) {
574 return base::kInvalidPlatformFileValue; 574 return base::kInvalidPlatformFileValue;
575 } 575 }
576 576
577 int WebKitPlatformSupportImpl::databaseDeleteFile( 577 int WebKitPlatformSupportImpl::databaseDeleteFile(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 worker_task_runner->OnWorkerRunLoopStarted(runLoop); 693 worker_task_runner->OnWorkerRunLoopStarted(runLoop);
694 } 694 }
695 695
696 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( 696 void WebKitPlatformSupportImpl::didStopWorkerRunLoop(
697 const WebKit::WebWorkerRunLoop& runLoop) { 697 const WebKit::WebWorkerRunLoop& runLoop) {
698 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); 698 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance();
699 worker_task_runner->OnWorkerRunLoopStopped(runLoop); 699 worker_task_runner->OnWorkerRunLoopStopped(runLoop);
700 } 700 }
701 701
702 } // namespace webkit_glue 702 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webthread_impl.h » ('j') | webkit/glue/webthread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698