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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 2534803002: Move InspectorTask handling from MainThreadTaskRunner to Document (Closed)
Patch Set: rebase Created 4 years 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 | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp ('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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 void WebSharedWorkerImpl::reportConsoleMessage(MessageSource, 233 void WebSharedWorkerImpl::reportConsoleMessage(MessageSource,
234 MessageLevel, 234 MessageLevel,
235 const String& message, 235 const String& message,
236 SourceLocation*) { 236 SourceLocation*) {
237 // Not supported in SharedWorker. 237 // Not supported in SharedWorker.
238 } 238 }
239 239
240 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) { 240 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) {
241 m_mainFrame->frame()->document()->postInspectorTask( 241 // The TaskType of Inspector tasks need to be Unthrottled because they need to
242 BLINK_FROM_HERE, 242 // run even on a suspended page.
243 createCrossThreadTask( 243 getParentFrameTaskRunners()
244 &WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread, 244 ->get(TaskType::Unthrottled)
245 crossThreadUnretained(this), message)); 245 ->postTask(
246 BLINK_FROM_HERE,
247 crossThreadBind(
248 &WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread,
249 crossThreadUnretained(this), message));
246 } 250 }
247 251
248 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread( 252 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(
249 const String& message) { 253 const String& message) {
250 m_workerInspectorProxy->dispatchMessageFromWorker(message); 254 m_workerInspectorProxy->dispatchMessageFromWorker(message);
251 } 255 }
252 256
253 ParentFrameTaskRunners* WebSharedWorkerImpl::getParentFrameTaskRunners() { 257 ParentFrameTaskRunners* WebSharedWorkerImpl::getParentFrameTaskRunners() {
254 return m_parentFrameTaskRunners.get(); 258 return m_parentFrameTaskRunners.get();
255 } 259 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 if (devtoolsAgent) 448 if (devtoolsAgent)
445 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, 449 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method,
446 message); 450 message);
447 } 451 }
448 452
449 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { 453 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) {
450 return new WebSharedWorkerImpl(client); 454 return new WebSharedWorkerImpl(client);
451 } 455 }
452 456
453 } // namespace blink 457 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698