summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webdevtoolsclient_impl.h
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 09:22:47 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 09:22:47 +0000
commitd2d9e014bf8ed05216b11eb032e0dbf2cf24a778 (patch)
treee03467e3c1a707ae318725d2c9a2f8e15c5571f3 /webkit/glue/webdevtoolsclient_impl.h
parent4cc874f542d307a0c24469ffc8e89ed4e3650eb6 (diff)
downloadchromium_src-d2d9e014bf8ed05216b11eb032e0dbf2cf24a778.zip
chromium_src-d2d9e014bf8ed05216b11eb032e0dbf2cf24a778.tar.gz
chromium_src-d2d9e014bf8ed05216b11eb032e0dbf2cf24a778.tar.bz2
DevTools: switch from CppBound* to pure v8 bindings in WebDevToolsClient host functions.
Review URL: http://codereview.chromium.org/100254 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webdevtoolsclient_impl.h')
-rw-r--r--webkit/glue/webdevtoolsclient_impl.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/webkit/glue/webdevtoolsclient_impl.h b/webkit/glue/webdevtoolsclient_impl.h
index 3309eeb..65d9095 100644
--- a/webkit/glue/webdevtoolsclient_impl.h
+++ b/webkit/glue/webdevtoolsclient_impl.h
@@ -7,13 +7,16 @@
#include <string>
+#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
+#include "v8.h"
#include "webkit/glue/cpp_bound_class.h"
#include "webkit/glue/devtools/devtools_rpc.h"
#include "webkit/glue/webdevtoolsclient.h"
namespace WebCore {
+class Page;
class String;
}
@@ -40,8 +43,12 @@ class WebDevToolsClientImpl : public WebDevToolsClient,
virtual void DispatchMessageFromAgent(const std::string& raw_msg);
private:
- void JsAddSourceToFrame(const CppArgumentList& args, CppVariant* result);
- void JsLoaded(const CppArgumentList& args, CppVariant* result);
+ static v8::Handle<v8::Value> JsAddSourceToFrame(const v8::Arguments& args);
+ static v8::Handle<v8::Value> JsLoaded(const v8::Arguments& args);
+ static v8::Persistent<v8::FunctionTemplate> host_template_;
+ static HashMap<WebCore::Page*, WebDevToolsClientImpl*> page_to_client_;
+
+ static void InitBoundObject();
WebViewImpl* web_view_impl_;
WebDevToolsClientDelegate* delegate_;
@@ -52,6 +59,7 @@ class WebDevToolsClientImpl : public WebDevToolsClient,
OwnPtr<JsToolsAgentBoundObj> tools_agent_obj_;
bool loaded_;
Vector<std::string> pending_incoming_messages_;
+ WebCore::Page* page_;
DISALLOW_COPY_AND_ASSIGN(WebDevToolsClientImpl);
};