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

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

Issue 387020: Upstreaming WebKit.gyp (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « chrome/worker/webworkerclient_proxy.cc ('k') | chrome/worker/worker_webkitclient_impl.h » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/worker/worker_thread.h" 5 #include "chrome/worker/worker_thread.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/thread_local.h" 8 #include "base/thread_local.h"
9 #include "chrome/common/worker_messages.h" 9 #include "chrome/common/worker_messages.h"
10 #include "chrome/worker/webworker_stub.h" 10 #include "chrome/worker/webworker_stub.h"
11 #include "chrome/worker/websharedworker_stub.h" 11 #include "chrome/worker/websharedworker_stub.h"
12 #include "chrome/worker/worker_webkitclient_impl.h" 12 #include "chrome/worker/worker_webkitclient_impl.h"
13 #include "webkit/api/public/WebKit.h" 13 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
14 14
15 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls( 15 static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls(
16 base::LINKER_INITIALIZED); 16 base::LINKER_INITIALIZED);
17 17
18 18
19 WorkerThread::WorkerThread() { 19 WorkerThread::WorkerThread() {
20 lazy_tls.Pointer()->Set(this); 20 lazy_tls.Pointer()->Set(this);
21 webkit_client_.reset(new WorkerWebKitClientImpl); 21 webkit_client_.reset(new WorkerWebKitClientImpl);
22 WebKit::initialize(webkit_client_.get()); 22 WebKit::initialize(webkit_client_.get());
23 } 23 }
(...skipping 17 matching lines...) Expand all
41 void WorkerThread::OnCreateWorker(const GURL& url, 41 void WorkerThread::OnCreateWorker(const GURL& url,
42 bool is_shared, 42 bool is_shared,
43 const string16& name, 43 const string16& name,
44 int route_id) { 44 int route_id) {
45 // WebWorkerStub and WebSharedWorkerStub own themselves. 45 // WebWorkerStub and WebSharedWorkerStub own themselves.
46 if (is_shared) 46 if (is_shared)
47 new WebSharedWorkerStub(name, route_id); 47 new WebSharedWorkerStub(name, route_id);
48 else 48 else
49 new WebWorkerStub(url, route_id); 49 new WebWorkerStub(url, route_id);
50 } 50 }
OLDNEW
« no previous file with comments | « chrome/worker/webworkerclient_proxy.cc ('k') | chrome/worker/worker_webkitclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698