OLD | NEW |
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/child/appcache_dispatcher.h" | 10 #include "content/child/appcache_dispatcher.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 using WebKit::WebRuntimeFeatures; | 27 using WebKit::WebRuntimeFeatures; |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls = | 31 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls = |
32 LAZY_INSTANCE_INITIALIZER; | 32 LAZY_INSTANCE_INITIALIZER; |
33 | 33 |
34 WorkerThread::WorkerThread() { | 34 WorkerThread::WorkerThread() { |
35 lazy_tls.Pointer()->Set(this); | 35 lazy_tls.Pointer()->Set(this); |
36 webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl( | 36 webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl( |
37 thread_safe_sender(), sync_message_filter())); | 37 thread_safe_sender(), |
| 38 sync_message_filter(), |
| 39 quota_message_filter())); |
38 WebKit::initialize(webkit_platform_support_.get()); | 40 WebKit::initialize(webkit_platform_support_.get()); |
39 | 41 |
40 appcache_dispatcher_.reset( | 42 appcache_dispatcher_.reset( |
41 new AppCacheDispatcher(this, new appcache::AppCacheFrontendImpl())); | 43 new AppCacheDispatcher(this, new appcache::AppCacheFrontendImpl())); |
42 | 44 |
43 web_database_observer_impl_.reset( | 45 web_database_observer_impl_.reset( |
44 new WebDatabaseObserverImpl(sync_message_filter())); | 46 new WebDatabaseObserverImpl(sync_message_filter())); |
45 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); | 47 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); |
46 db_message_filter_ = new DBMessageFilter(); | 48 db_message_filter_ = new DBMessageFilter(); |
47 channel()->AddFilter(db_message_filter_.get()); | 49 channel()->AddFilter(db_message_filter_.get()); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 112 |
111 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { | 113 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { |
112 worker_stubs_.erase(stub); | 114 worker_stubs_.erase(stub); |
113 } | 115 } |
114 | 116 |
115 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { | 117 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { |
116 worker_stubs_.insert(stub); | 118 worker_stubs_.insert(stub); |
117 } | 119 } |
118 | 120 |
119 } // namespace content | 121 } // namespace content |
OLD | NEW |