| 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/common/appcache/appcache_dispatcher.h" | 10 #include "content/common/appcache/appcache_dispatcher.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 LAZY_INSTANCE_INITIALIZER; | 28 LAZY_INSTANCE_INITIALIZER; |
| 29 | 29 |
| 30 | 30 |
| 31 WorkerThread::WorkerThread() { | 31 WorkerThread::WorkerThread() { |
| 32 lazy_tls.Pointer()->Set(this); | 32 lazy_tls.Pointer()->Set(this); |
| 33 webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl); | 33 webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl); |
| 34 WebKit::initialize(webkit_platform_support_.get()); | 34 WebKit::initialize(webkit_platform_support_.get()); |
| 35 | 35 |
| 36 appcache_dispatcher_.reset(new AppCacheDispatcher(this)); | 36 appcache_dispatcher_.reset(new AppCacheDispatcher(this)); |
| 37 | 37 |
| 38 web_database_observer_impl_.reset(new WebDatabaseObserverImpl(this)); | 38 web_database_observer_impl_.reset( |
| 39 new WebDatabaseObserverImpl(sync_message_filter())); |
| 39 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); | 40 WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); |
| 40 db_message_filter_ = new DBMessageFilter(); | 41 db_message_filter_ = new DBMessageFilter(); |
| 41 channel()->AddFilter(db_message_filter_.get()); | 42 channel()->AddFilter(db_message_filter_.get()); |
| 42 | 43 |
| 43 indexed_db_message_filter_ = new IndexedDBMessageFilter; | 44 indexed_db_message_filter_ = new IndexedDBMessageFilter; |
| 44 channel()->AddFilter(indexed_db_message_filter_.get()); | 45 channel()->AddFilter(indexed_db_message_filter_.get()); |
| 45 | 46 |
| 46 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 47 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 47 | 48 |
| 48 webkit_glue::EnableWebCoreLogChannels( | 49 webkit_glue::EnableWebCoreLogChannels( |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 119 } |
| 119 } | 120 } |
| 120 | 121 |
| 121 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { | 122 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { |
| 122 worker_stubs_.erase(stub); | 123 worker_stubs_.erase(stub); |
| 123 } | 124 } |
| 124 | 125 |
| 125 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { | 126 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { |
| 126 worker_stubs_.insert(stub); | 127 worker_stubs_.insert(stub); |
| 127 } | 128 } |
| OLD | NEW |