| Index: webkit/glue/webworker.h
|
| ===================================================================
|
| --- webkit/glue/webworker.h (revision 0)
|
| +++ webkit/glue/webworker.h (revision 0)
|
| @@ -0,0 +1,39 @@
|
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef WEBKIT_GLUE_WEBWORKER_H_
|
| +#define WEBKIT_GLUE_WEBPLUGIN_H_
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +
|
| +class GURL;
|
| +
|
| +// This is a version of the WorkerContextProxy interface that uses Chrome data
|
| +// types, so that the renderer code can create different implementations.
|
| +class WebWorkerContextProxy {
|
| + public:
|
| + WebWorkerContextProxy() { }
|
| + virtual ~WebWorkerContextProxy() { }
|
| +
|
| + virtual void StartWorkerContext(const GURL& script_url,
|
| + const std::string& user_agent,
|
| + const std::string& source_code) = 0;
|
| + virtual void TerminateWorkerContext() = 0;
|
| + virtual void PostMessageToWorkerContext(const std::string&) = 0;
|
| + virtual bool HasPendingActivity() const = 0;
|
| + virtual void WorkerObjectDestroyed() = 0;
|
| +
|
| + private:
|
| + DISALLOW_EVIL_CONSTRUCTORS(WebWorkerContextProxy);
|
| +};
|
| +
|
| +// Creates a wrapper around the WebKit WorkerContextProxy implementation, so
|
| +// Chrome code can call it using Chrome data types which get converted into
|
| +// WebKit data types.
|
| +WebWorkerContextProxy* CreateWebWorkerContextWrapper();
|
| +
|
| +#endif // #ifndef WEBKIT_GLUE_WEBWORKER_H_
|
|
|