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

Unified Diff: Source/core/inspector/InjectedScriptHost.h

Issue 1149383005: DevTools: remove InjectedScriptHost.idl, implement the binding without generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InjectedScriptHost.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptHost.h
diff --git a/Source/core/inspector/InjectedScriptHost.h b/Source/core/inspector/InjectedScriptHost.h
index 4901bb6e49a09f165eb20e8be97f2900b87a4a51..37cc69d156f1c09898bcec56352bd13f0c9f1592 100644
--- a/Source/core/inspector/InjectedScriptHost.h
+++ b/Source/core/inspector/InjectedScriptHost.h
@@ -31,7 +31,6 @@
#define InjectedScriptHost_h
#include "bindings/core/v8/ScriptState.h"
-#include "bindings/core/v8/ScriptWrappable.h"
#include "core/InspectorTypeBuilder.h"
#include "core/inspector/InjectedScriptHostClient.h"
#include "wtf/Functional.h"
@@ -39,6 +38,7 @@
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
+#include <v8.h>
namespace blink {
@@ -58,8 +58,7 @@ struct EventListenerInfo;
// InjectedScriptHost must never implemment methods that have more power over the page than the
// page already has itself (e.g. origin restriction bypasses).
-class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<InjectedScriptHost>, public ScriptWrappable {
- DEFINE_WRAPPERTYPEINFO();
+class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<InjectedScriptHost> {
public:
static PassRefPtrWillBeRawPtr<InjectedScriptHost> create();
~InjectedScriptHost();
@@ -104,6 +103,10 @@ public:
V8Debugger& debugger() { return *m_debugger; }
InjectedScriptHostClient* client() { return m_client.get(); }
+ // FIXME: store this template in per isolate data
+ void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8::Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); }
+ v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { return v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); }
+
private:
InjectedScriptHost();
@@ -114,6 +117,7 @@ private:
Vector<OwnPtr<InspectableObject> > m_inspectedObjects;
OwnPtr<InspectableObject> m_defaultInspectableObject;
OwnPtr<InjectedScriptHostClient> m_client;
+ v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
};
} // namespace blink
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InjectedScriptHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698