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_WEBPLUGIN_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 |
| 13 class GURL; |
| 14 |
| 15 // This is a version of the WorkerContextProxy interface that uses Chrome data |
| 16 // types, so that the renderer code can create different implementations. |
| 17 class WebWorkerContextProxy { |
| 18 public: |
| 19 WebWorkerContextProxy() { } |
| 20 virtual ~WebWorkerContextProxy() { } |
| 21 |
| 22 virtual void StartWorkerContext(const GURL& script_url, |
| 23 const std::string& user_agent, |
| 24 const std::string& source_code) = 0; |
| 25 virtual void TerminateWorkerContext() = 0; |
| 26 virtual void PostMessageToWorkerContext(const std::string&) = 0; |
| 27 virtual bool HasPendingActivity() const = 0; |
| 28 virtual void WorkerObjectDestroyed() = 0; |
| 29 |
| 30 private: |
| 31 DISALLOW_EVIL_CONSTRUCTORS(WebWorkerContextProxy); |
| 32 }; |
| 33 |
| 34 // Creates a wrapper around the WebKit WorkerContextProxy implementation, so |
| 35 // Chrome code can call it using Chrome data types which get converted into |
| 36 // WebKit data types. |
| 37 WebWorkerContextProxy* CreateWebWorkerContextWrapper(); |
| 38 |
| 39 #endif // #ifndef WEBKIT_GLUE_WEBWORKER_H_ |
OLD | NEW |