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

Side by Side Diff: content/worker/worker_thread.cc

Issue 12330162: Use ThreadSafeSender in a couple of places. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 "content/worker/worker_thread.h" 5 #include "content/worker/worker_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread_local.h" 9 #include "base/threading/thread_local.h"
10 #include "content/common/appcache/appcache_dispatcher.h" 10 #include "content/common/appcache/appcache_dispatcher.h"
(...skipping 14 matching lines...) Expand all
25 25
26 using WebKit::WebRuntimeFeatures; 26 using WebKit::WebRuntimeFeatures;
27 27
28 namespace content { 28 namespace content {
29 29
30 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls = 30 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls =
31 LAZY_INSTANCE_INITIALIZER; 31 LAZY_INSTANCE_INITIALIZER;
32 32
33 WorkerThread::WorkerThread() { 33 WorkerThread::WorkerThread() {
34 lazy_tls.Pointer()->Set(this); 34 lazy_tls.Pointer()->Set(this);
35 webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl); 35 webkit_platform_support_.reset(
36 new WorkerWebKitPlatformSupportImpl(thread_safe_sender()));
36 WebKit::initialize(webkit_platform_support_.get()); 37 WebKit::initialize(webkit_platform_support_.get());
37 WebKit::setIDBFactory( 38 WebKit::setIDBFactory(
38 webkit_platform_support_.get()->idbFactory()); 39 webkit_platform_support_.get()->idbFactory());
39 40
40 appcache_dispatcher_.reset(new AppCacheDispatcher(this)); 41 appcache_dispatcher_.reset(new AppCacheDispatcher(this));
41 42
42 web_database_observer_impl_.reset( 43 web_database_observer_impl_.reset(
43 new WebDatabaseObserverImpl(sync_message_filter())); 44 new WebDatabaseObserverImpl(sync_message_filter()));
44 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); 45 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get());
45 db_message_filter_ = new DBMessageFilter(); 46 db_message_filter_ = new DBMessageFilter();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { 127 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) {
127 worker_stubs_.erase(stub); 128 worker_stubs_.erase(stub);
128 } 129 }
129 130
130 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { 131 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) {
131 worker_stubs_.insert(stub); 132 worker_stubs_.insert(stub);
132 } 133 }
133 134
134 } // namespace content 135 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | content/worker/worker_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698