OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_GLUE_WEBWORKER_H_ |
| 6 #define WEBKIT_GLUE_WEBWORKER_H_ |
| 7 |
| 8 #include "base/string16.h" |
| 9 |
| 10 class GURL; |
| 11 class WebWorkerClient; |
| 12 |
| 13 // This is a version of the WebCore::WorkerContextProxy interface that uses |
| 14 // Chrome data types. |
| 15 class WebWorker { |
| 16 public: |
| 17 virtual ~WebWorker() { } |
| 18 |
| 19 // Creates a WebWorker object that wraps around the WebKit code that implement
s |
| 20 // web workers. |
| 21 static WebWorker* Create(WebWorkerClient* client); |
| 22 |
| 23 virtual void StartWorkerContext(const GURL& script_url, |
| 24 const string16& user_agent, |
| 25 const string16& source_code) = 0; |
| 26 virtual void TerminateWorkerContext() = 0; |
| 27 virtual void PostMessageToWorkerContext(const string16& message) = 0; |
| 28 virtual void WorkerObjectDestroyed() = 0; |
| 29 }; |
| 30 |
| 31 #endif // #ifndef WEBKIT_GLUE_WEBWORKER_H_ |
OLD | NEW |