Chromium Code Reviews| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 { | 162 { |
| 163 ASSERT(m_webView); | 163 ASSERT(m_webView); |
| 164 | 164 |
| 165 // Detach the client before closing the view to avoid getting called back. | 165 // Detach the client before closing the view to avoid getting called back. |
| 166 toWebLocalFrameImpl(m_mainFrame)->setClient(0); | 166 toWebLocalFrameImpl(m_mainFrame)->setClient(0); |
| 167 | 167 |
| 168 m_webView->close(); | 168 m_webView->close(); |
| 169 m_mainFrame->close(); | 169 m_mainFrame->close(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void WebEmbeddedWorkerImpl::postTask(PassOwnPtr<ExecutionContextTask> task) | |
|
Jeffrey Yasskin
2014/07/16 23:14:58
This is again used by the test.
In Content, this
| |
| 173 { | |
| 174 // We don't propagate the bool return because |true| doesn't mean the task w ill be run. | |
| 175 m_workerThread->runLoop().postTask(task); | |
| 176 } | |
| 177 | |
| 172 void WebEmbeddedWorkerImpl::startWorkerContext( | 178 void WebEmbeddedWorkerImpl::startWorkerContext( |
| 173 const WebEmbeddedWorkerStartData& data) | 179 const WebEmbeddedWorkerStartData& data) |
| 174 { | 180 { |
| 175 ASSERT(!m_askedToTerminate); | 181 ASSERT(!m_askedToTerminate); |
| 176 ASSERT(!m_mainScriptLoader); | 182 ASSERT(!m_mainScriptLoader); |
| 177 ASSERT(m_pauseAfterDownloadState == DontPauseAfterDownload); | 183 ASSERT(m_pauseAfterDownloadState == DontPauseAfterDownload); |
| 178 m_workerStartData = data; | 184 m_workerStartData = data; |
| 179 if (data.pauseAfterDownloadMode == WebEmbeddedWorkerStartData::PauseAfterDow nload) | 185 if (data.pauseAfterDownloadMode == WebEmbeddedWorkerStartData::PauseAfterDow nload) |
| 180 m_pauseAfterDownloadState = DoPauseAfterDownload; | 186 m_pauseAfterDownloadState = DoPauseAfterDownload; |
| 181 prepareShadowPageForLoader(); | 187 prepareShadowPageForLoader(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 359 m_mainScriptLoader.clear(); | 365 m_mainScriptLoader.clear(); |
| 360 | 366 |
| 361 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient); | 367 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient); |
| 362 m_loaderProxy = LoaderProxy::create(*this); | 368 m_loaderProxy = LoaderProxy::create(*this); |
| 363 | 369 |
| 364 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release()); | 370 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release()); |
| 365 m_workerThread->start(); | 371 m_workerThread->start(); |
| 366 } | 372 } |
| 367 | 373 |
| 368 } // namespace blink | 374 } // namespace blink |
| OLD | NEW |