| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 if (worker->scriptExecutionContext()->isDocument()) { | 64 if (worker->scriptExecutionContext()->isDocument()) { |
| 65 // Get to the RenderView, so that we can tell the browser to create a | 65 // Get to the RenderView, so that we can tell the browser to create a |
| 66 // worker process if necessary. | 66 // worker process if necessary. |
| 67 WebCore::Document* document = static_cast<WebCore::Document*>( | 67 WebCore::Document* document = static_cast<WebCore::Document*>( |
| 68 worker->scriptExecutionContext()); | 68 worker->scriptExecutionContext()); |
| 69 WebFrameLoaderClient* frame_loader_client = | 69 WebFrameLoaderClient* frame_loader_client = |
| 70 static_cast<WebFrameLoaderClient*>( | 70 static_cast<WebFrameLoaderClient*>( |
| 71 document->frame()->loader()->client()); | 71 document->frame()->loader()->client()); |
| 72 WebViewDelegate* webview_delegate = | 72 WebViewDelegate* webview_delegate = |
| 73 frame_loader_client->webframe()->webview_impl()->delegate(); | 73 frame_loader_client->webframe()->GetWebViewImpl()->delegate(); |
| 74 webworker = webview_delegate->CreateWebWorker(proxy); | 74 webworker = webview_delegate->CreateWebWorker(proxy); |
| 75 } else { | 75 } else { |
| 76 webworker = WebKit::webKitClient()->CreateWebWorker(proxy); | 76 webworker = WebKit::webKitClient()->CreateWebWorker(proxy); |
| 77 } | 77 } |
| 78 | 78 |
| 79 proxy->set_webworker(webworker); | 79 proxy->set_webworker(webworker); |
| 80 return proxy; | 80 return proxy; |
| 81 } | 81 } |
| 82 | 82 |
| 83 | 83 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 321 } |
| 322 | 322 |
| 323 void WebWorkerClientImpl::ReportPendingActivityTask( | 323 void WebWorkerClientImpl::ReportPendingActivityTask( |
| 324 WebCore::ScriptExecutionContext* context, | 324 WebCore::ScriptExecutionContext* context, |
| 325 WebWorkerClientImpl* this_ptr, | 325 WebWorkerClientImpl* this_ptr, |
| 326 bool has_pending_activity) { | 326 bool has_pending_activity) { |
| 327 this_ptr->worker_context_had_pending_activity_ = has_pending_activity; | 327 this_ptr->worker_context_had_pending_activity_ = has_pending_activity; |
| 328 } | 328 } |
| 329 | 329 |
| 330 #endif | 330 #endif |
| OLD | NEW |