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

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

Issue 1777323005: Revert of [DevTools] Remove extra plumbing from InspectorWorkerAgent, prepare to multi-client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Not supported in SharedWorker. 223 // Not supported in SharedWorker.
224 } 224 }
225 225
226 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) 226 void WebSharedWorkerImpl::postMessageToPageInspector(const String& message)
227 { 227 {
228 m_mainFrame->frame()->document()->postInspectorTask(BLINK_FROM_HERE, createC rossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread, thi s, message)); 228 m_mainFrame->frame()->document()->postInspectorTask(BLINK_FROM_HERE, createC rossThreadTask(&WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread, thi s, message));
229 } 229 }
230 230
231 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m essage) 231 void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(const String& m essage)
232 { 232 {
233 m_workerInspectorProxy->dispatchMessageFromWorker(message); 233 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy- >pageInspector();
234 if (!pageInspector)
235 return;
236 pageInspector->dispatchMessageFromWorker(message);
237
234 } 238 }
235 239
236 void WebSharedWorkerImpl::workerGlobalScopeClosed() 240 void WebSharedWorkerImpl::workerGlobalScopeClosed()
237 { 241 {
238 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A llowCrossThreadAccess(this))); 242 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A llowCrossThreadAccess(this)));
239 } 243 }
240 244
241 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread() 245 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread()
242 { 246 {
243 m_client->workerContextClosed(); 247 m_client->workerContextClosed();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (devtoolsAgent) 394 if (devtoolsAgent)
391 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); 395 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message);
392 } 396 }
393 397
394 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 398 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
395 { 399 {
396 return new WebSharedWorkerImpl(client); 400 return new WebSharedWorkerImpl(client);
397 } 401 }
398 402
399 } // namespace blink 403 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698