Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: Source/WebCore/bindings/v8/ScriptController.h

Issue 8806015: Changes to support a second VM. (Closed) Base URL: svn://svn.chromium.org/dash/experimental/chrome/src/webkit-full
Patch Set: . Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/bindings/v8/ScriptController.h
diff --git a/Source/WebCore/bindings/v8/ScriptController.h b/Source/WebCore/bindings/v8/ScriptController.h
index 0d9938f8f49e8b7d3b8e9529c41cdade4eb417e7..0d9ad66d8faaa1e530a5beeef6b7876f1e4403f2 100644
--- a/Source/WebCore/bindings/v8/ScriptController.h
+++ b/Source/WebCore/bindings/v8/ScriptController.h
@@ -62,6 +62,16 @@ class HTMLPlugInElement;
class ScriptSourceCode;
class Widget;
+class AbstractController : public RefCounted<AbstractController> {
+public:
+ virtual ~AbstractController() {}
+
+ virtual bool isScriptTypeSupported(const String& mimeType) = 0;
+ virtual void evaluate(const ScriptSourceCode&) = 0;
+ virtual void bindToWindowObject(Frame*, const String& key, NPObject*) = 0;
+ virtual void clearWindowShell() = 0;
+};
+
class ScriptController {
public:
ScriptController(Frame*);
@@ -188,6 +198,9 @@ public:
void evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*);
static void getAllWorlds(Vector<DOMWrapperWorld*>& worlds);
+ bool isScriptTypeSupported(const String& mimeType);
+ AbstractController* controller(const String& name);
+
private:
Frame* m_frame;
const String* m_sourceURL;
@@ -196,6 +209,9 @@ private:
bool m_paused;
+ typedef HashMap<String, RefPtr<AbstractController> > ControllerMap;
+ ControllerMap m_controllers;
+
OwnPtr<V8Proxy> m_proxy;
typedef HashMap<Widget*, NPObject*> PluginObjectMap;
#if PLATFORM(QT)

Powered by Google App Engine
This is Rietveld 408576698