| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if ENABLE(WORKERS) | 7 #if ENABLE(WORKERS) |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // WebWorkerClientImpl. | 61 // WebWorkerClientImpl. |
| 62 // | 62 // |
| 63 // Note that if we're running each worker in a separate process, then nested | 63 // Note that if we're running each worker in a separate process, then nested |
| 64 // workers end up using the same codepath as the renderer process. | 64 // workers end up using the same codepath as the renderer process. |
| 65 | 65 |
| 66 // static | 66 // static |
| 67 WebCore::WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy( | 67 WebCore::WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy( |
| 68 WebCore::Worker* worker) { | 68 WebCore::Worker* worker) { |
| 69 if (!worker->scriptExecutionContext()->isDocument() && | 69 if (!worker->scriptExecutionContext()->isDocument() && |
| 70 CommandLine::ForCurrentProcess()->HasSwitch( | 70 CommandLine::ForCurrentProcess()->HasSwitch( |
| 71 L"web-worker-share-processes")) { | 71 "web-worker-share-processes")) { |
| 72 return new WebCore::WorkerMessagingProxy(worker); | 72 return new WebCore::WorkerMessagingProxy(worker); |
| 73 } | 73 } |
| 74 | 74 |
| 75 WebWorker* webworker = NULL; | 75 WebWorker* webworker = NULL; |
| 76 WebWorkerClientImpl* proxy = new WebWorkerClientImpl(worker); | 76 WebWorkerClientImpl* proxy = new WebWorkerClientImpl(worker); |
| 77 | 77 |
| 78 if (worker->scriptExecutionContext()->isDocument()) { | 78 if (worker->scriptExecutionContext()->isDocument()) { |
| 79 WebCore::Document* document = static_cast<WebCore::Document*>( | 79 WebCore::Document* document = static_cast<WebCore::Document*>( |
| 80 worker->scriptExecutionContext()); | 80 worker->scriptExecutionContext()); |
| 81 WebFrameImpl* webframe = WebFrameImpl::FromFrame(document->frame()); | 81 WebFrameImpl* webframe = WebFrameImpl::FromFrame(document->frame()); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 } | 402 } |
| 403 | 403 |
| 404 void WebWorkerClientImpl::ReportPendingActivityTask( | 404 void WebWorkerClientImpl::ReportPendingActivityTask( |
| 405 WebCore::ScriptExecutionContext* context, | 405 WebCore::ScriptExecutionContext* context, |
| 406 WebWorkerClientImpl* this_ptr, | 406 WebWorkerClientImpl* this_ptr, |
| 407 bool has_pending_activity) { | 407 bool has_pending_activity) { |
| 408 this_ptr->worker_context_had_pending_activity_ = has_pending_activity; | 408 this_ptr->worker_context_had_pending_activity_ = has_pending_activity; |
| 409 } | 409 } |
| 410 | 410 |
| 411 #endif | 411 #endif |
| OLD | NEW |