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/appcache_dispatcher.h" | 10 #include "content/child/appcache/appcache_dispatcher.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 void WorkerThread::OnCreateWorker( | 118 void WorkerThread::OnCreateWorker( |
119 const WorkerProcessMsg_CreateWorker_Params& params) { | 119 const WorkerProcessMsg_CreateWorker_Params& params) { |
120 // WebSharedWorkerStub own themselves. | 120 // WebSharedWorkerStub own themselves. |
121 new WebSharedWorkerStub( | 121 new WebSharedWorkerStub( |
122 params.url, | 122 params.url, |
123 params.name, | 123 params.name, |
124 params.content_security_policy, | 124 params.content_security_policy, |
125 params.security_policy_type, | 125 params.security_policy_type, |
| 126 params.pause_on_start, |
126 params.route_id); | 127 params.route_id); |
127 } | 128 } |
128 | 129 |
129 // The browser process is likely dead. Terminate all workers. | 130 // The browser process is likely dead. Terminate all workers. |
130 void WorkerThread::OnChannelError() { | 131 void WorkerThread::OnChannelError() { |
131 set_on_channel_error_called(true); | 132 set_on_channel_error_called(true); |
132 | 133 |
133 for (WorkerStubsList::iterator it = worker_stubs_.begin(); | 134 for (WorkerStubsList::iterator it = worker_stubs_.begin(); |
134 it != worker_stubs_.end(); ++it) { | 135 it != worker_stubs_.end(); ++it) { |
135 (*it)->OnChannelError(); | 136 (*it)->OnChannelError(); |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { | 140 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { |
140 worker_stubs_.erase(stub); | 141 worker_stubs_.erase(stub); |
141 } | 142 } |
142 | 143 |
143 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { | 144 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { |
144 worker_stubs_.insert(stub); | 145 worker_stubs_.insert(stub); |
145 } | 146 } |
146 | 147 |
147 } // namespace content | 148 } // namespace content |
OLD | NEW |