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

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

Issue 213423008: Add pause_on_start flag to WorkerProcessMsg_CreateWorker_Params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated yurys's comment Created 6 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
« no previous file with comments | « content/worker/websharedworker_stub.cc ('k') | no next file » | 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) 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
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
OLDNEW
« no previous file with comments | « content/worker/websharedworker_stub.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698