summaryrefslogtreecommitdiffstats
path: root/webkit/pending
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 18:39:50 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 18:39:50 +0000
commita035982962aa5af5f97aeef374755843d6ad2c89 (patch)
tree2a1bdb04c729444fd6223e9edc9b5bb5a3223852 /webkit/pending
parent773169e0326446476a339300fbdfaf499d13598f (diff)
downloadchromium_src-a035982962aa5af5f97aeef374755843d6ad2c89.zip
chromium_src-a035982962aa5af5f97aeef374755843d6ad2c89.tar.gz
chromium_src-a035982962aa5af5f97aeef374755843d6ad2c89.tar.bz2
Lots of ScriptController fixes, but it still doesn't compile cleanly.
This makes the header and C file noticeably more like the upstream versions. In some cases I have ripped out the implementations of functions that we added that there's no obvious way to make it work. The V8 team is going to have to implement these. This code absolutely isn't going to run. Review URL: http://codereview.chromium.org/7313 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/pending')
-rw-r--r--webkit/pending/ScriptController.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/webkit/pending/ScriptController.h b/webkit/pending/ScriptController.h
index 9b90e75..6dbe13a 100644
--- a/webkit/pending/ScriptController.h
+++ b/webkit/pending/ScriptController.h
@@ -37,6 +37,7 @@
#include "bindings/npruntime.h"
#if USE(JSC)
+#include "JSDOMWindowShell.h"
#include <kjs/ustring.h>
#endif
@@ -167,6 +168,21 @@ public:
ScriptController(Frame*);
~ScriptController();
+#if USE(JSC)
+ bool haveWindowShell() const { return m_windowShell; }
+ JSDOMWindowShell* windowShell()
+ {
+ initScriptIfNeeded();
+ return m_windowShell;
+ }
+
+ JSDOMWindow* globalObject()
+ {
+ initScriptIfNeeded();
+ return m_windowShell->window();
+ }
+#endif
+
#if USE(V8)
// TODO(eseidel): V8Proxy should either be folded into ScriptController
// or this accessor should be made JSProxy*
@@ -192,8 +208,6 @@ public:
PassRefPtr<EventListener> createSVGEventHandler(const String& functionName, const String& code, Node*);
#endif
- // Get the Root object
- // JSRootObject* getRootObject();
// Creates a property of the global object of a frame.
void BindToWindowObject(Frame*, const String& key, NPObject*);
@@ -210,7 +224,7 @@ public:
bool isEnabled() const;
- // TODO(eseide): void* is a compile hack
+ // TODO(eseidel): void* is a compile hack
void attachDebugger(void*);
// Create a NPObject wrapper for a JSObject
@@ -271,12 +285,32 @@ public:
void clearScriptObjects();
void cleanupScriptObjectsForPlugin(void*);
+#if USE(JSC)
+ KJS::Bindings::RootObject* bindingRootObject();
+#endif
+
#if ENABLE(NETSCAPE_PLUGIN_API)
NPObject* createScriptObjectForPluginElement(HTMLPlugInElement*);
NPObject* windowScriptNPObject();
#endif
private:
+#if USE(JSC)
+ void initScriptIfNeeded()
+ {
+ if (!m_windowShell)
+ initScript();
+ }
+ void initScript();
+
+ void clearPlatformScriptObjects();
+ void disconnectPlatformScriptObjects();
+
+ KJS::ProtectedPtr<JSDOMWindowShell> m_windowShell;
+ HashSet<JSDOMWindow*> m_liveFormerWindows;
+ int m_handlerLineno;
+#endif
+
static bool m_recordPlaybackMode;
Frame* m_frame;