| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 void WebEmbeddedWorkerImpl::detachDevTools() | 239 void WebEmbeddedWorkerImpl::detachDevTools() |
| 240 { | 240 { |
| 241 m_workerThread->runLoop().postDebuggerTask(createCallbackTask(disconnectFrom
WorkerContextInspectorTask, true)); | 241 m_workerThread->runLoop().postDebuggerTask(createCallbackTask(disconnectFrom
WorkerContextInspectorTask, true)); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void WebEmbeddedWorkerImpl::dispatchDevToolsMessage(const WebString& message) | 244 void WebEmbeddedWorkerImpl::dispatchDevToolsMessage(const WebString& message) |
| 245 { | 245 { |
| 246 m_workerThread->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); | 246 m_workerThread->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp
ectorBackendTask, String(message))); |
| 247 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(m_workerThread.ge
t()); | 247 m_workerThread->interruptAndDispatchInspectorCommands(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() | 250 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() |
| 251 { | 251 { |
| 252 // Create 'shadow page', which is never displayed and is used mainly to | 252 // Create 'shadow page', which is never displayed and is used mainly to |
| 253 // provide a context for loading on the main thread. | 253 // provide a context for loading on the main thread. |
| 254 // | 254 // |
| 255 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. | 255 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. |
| 256 // This code, and probably most of the code in this class should be shared | 256 // This code, and probably most of the code in this class should be shared |
| 257 // with SharedWorker. | 257 // with SharedWorker. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 m_mainScriptLoader.clear(); | 328 m_mainScriptLoader.clear(); |
| 329 | 329 |
| 330 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW
ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient); | 330 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW
ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient); |
| 331 m_loaderProxy = LoaderProxy::create(*this); | 331 m_loaderProxy = LoaderProxy::create(*this); |
| 332 | 332 |
| 333 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal
ScopeProxy, startupData.release()); | 333 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal
ScopeProxy, startupData.release()); |
| 334 m_workerThread->start(); | 334 m_workerThread->start(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace blink | 337 } // namespace blink |
| OLD | NEW |