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

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

Issue 1774323002: [DevTools] Remove extra plumbing from InspectorWorkerAgent, prepare to multi-client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed leaks 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 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy- >pageInspector(); 233 m_workerInspectorProxy->dispatchMessageFromWorker(message);
234 if (!pageInspector)
235 return;
236 pageInspector->dispatchMessageFromWorker(message);
237
238 } 234 }
239 235
240 void WebSharedWorkerImpl::workerGlobalScopeClosed() 236 void WebSharedWorkerImpl::workerGlobalScopeClosed()
241 { 237 {
242 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A llowCrossThreadAccess(this))); 238 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FROM_H ERE, threadSafeBind(&WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread, A llowCrossThreadAccess(this)));
243 } 239 }
244 240
245 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread() 241 void WebSharedWorkerImpl::workerGlobalScopeClosedOnMainThread()
246 { 242 {
247 m_client->workerContextClosed(); 243 m_client->workerContextClosed();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (devtoolsAgent) 390 if (devtoolsAgent)
395 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); 391 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message);
396 } 392 }
397 393
398 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 394 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
399 { 395 {
400 return new WebSharedWorkerImpl(client); 396 return new WebSharedWorkerImpl(client);
401 } 397 }
402 398
403 } // namespace blink 399 } // 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