| 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 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 #include "GenericWorkerTask.h" | 9 #include "GenericWorkerTask.h" |
| 10 #include "KURL.h" | 10 #include "KURL.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 void WebWorkerImpl::PostMessageToWorkerContextTask( | 66 void WebWorkerImpl::PostMessageToWorkerContextTask( |
| 67 WebCore::ScriptExecutionContext* context, | 67 WebCore::ScriptExecutionContext* context, |
| 68 WebWorkerImpl* this_ptr, | 68 WebWorkerImpl* this_ptr, |
| 69 const WebCore::String& message) { | 69 const WebCore::String& message) { |
| 70 DCHECK(context->isWorkerContext()); | 70 DCHECK(context->isWorkerContext()); |
| 71 WebCore::WorkerContext* worker_context = | 71 WebCore::WorkerContext* worker_context = |
| 72 static_cast<WebCore::WorkerContext*>(context); | 72 static_cast<WebCore::WorkerContext*>(context); |
| 73 worker_context->dispatchMessage(message); | 73 worker_context->dispatchMessage(message); |
| 74 | 74 |
| 75 this_ptr->client_->confirmMessageFromWorkerObject( | 75 this_ptr->confirmMessageFromWorkerObject( |
| 76 worker_context->hasPendingActivity()); | 76 worker_context->hasPendingActivity()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 // WebWorker ------------------------------------------------------------------- | 79 // WebWorker ------------------------------------------------------------------- |
| 80 | 80 |
| 81 void WebWorkerImpl::startWorkerContext(const WebURL& script_url, | 81 void WebWorkerImpl::startWorkerContext(const WebURL& script_url, |
| 82 const WebString& user_agent, | 82 const WebString& user_agent, |
| 83 const WebString& source_code) { | 83 const WebString& source_code) { |
| 84 worker_thread_ = WebCore::WorkerThread::create( | 84 worker_thread_ = WebCore::WorkerThread::create( |
| 85 webkit_glue::WebURLToKURL(script_url), | 85 webkit_glue::WebURLToKURL(script_url), |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 namespace WebKit { | 258 namespace WebKit { |
| 259 | 259 |
| 260 WebWorker* WebWorker::create(WebWorkerClient* client) { | 260 WebWorker* WebWorker::create(WebWorkerClient* client) { |
| 261 return NULL; | 261 return NULL; |
| 262 } | 262 } |
| 263 | 263 |
| 264 } | 264 } |
| 265 | 265 |
| 266 #endif | 266 #endif |
| OLD | NEW |