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

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

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/utility/utility_main.cc ('k') | content/worker/worker_main.cc » ('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) 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/websharedworkerclient_proxy.h" 5 #include "content/worker/websharedworkerclient_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/common/fileapi/file_system_dispatcher.h" 10 #include "content/common/fileapi/file_system_dispatcher.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 bool WebSharedWorkerClientProxy::Send(IPC::Message* message) { 201 bool WebSharedWorkerClientProxy::Send(IPC::Message* message) {
202 return WorkerThread::current()->Send(message); 202 return WorkerThread::current()->Send(message);
203 } 203 }
204 204
205 void WebSharedWorkerClientProxy::EnsureWorkerContextTerminates() { 205 void WebSharedWorkerClientProxy::EnsureWorkerContextTerminates() {
206 // This shuts down the process cleanly from the perspective of the browser 206 // This shuts down the process cleanly from the perspective of the browser
207 // process, and avoids the crashed worker infobar from appearing to the new 207 // process, and avoids the crashed worker infobar from appearing to the new
208 // page. It's ok to post several of theese, because the first executed task 208 // page. It's ok to post several of theese, because the first executed task
209 // will exit the message loop and subsequent ones won't be executed. 209 // will exit the message loop and subsequent ones won't be executed.
210 MessageLoop::current()->PostDelayedTask(FROM_HERE, 210 base::MessageLoop::current()->PostDelayedTask(
211 base::Bind( 211 FROM_HERE,
212 &WebSharedWorkerClientProxy::workerContextDestroyed, 212 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed,
213 weak_factory_.GetWeakPtr()), 213 weak_factory_.GetWeakPtr()),
214 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); 214 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds));
215 } 215 }
216 216
217 } // namespace content 217 } // namespace content
OLDNEW
« no previous file with comments | « content/utility/utility_main.cc ('k') | content/worker/worker_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698