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

Unified Diff: Source/bindings/scripts/callbackHeader.template

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: non-callback headers working Created 7 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/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/scripts/callbackImplementation.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/callbackHeader.template
diff --git a/Source/bindings/tests/results/V8TestCallback.h b/Source/bindings/scripts/callbackHeader.template
similarity index 53%
copy from Source/bindings/tests/results/V8TestCallback.h
copy to Source/bindings/scripts/callbackHeader.template
index aad2763752431452403a6ddd5169b366fe7dec81..bf5c414562051b4b00f3f36e0a1179beb72c020c 100644
--- a/Source/bindings/tests/results/V8TestCallback.h
+++ b/Source/bindings/scripts/callbackHeader.template
@@ -18,43 +18,37 @@
Boston, MA 02111-1307, USA.
*/
-#ifndef V8TestCallback_h
-#define V8TestCallback_h
-
-#include "bindings/bindings/tests/idls/TestCallback.h"
-#include "bindings/v8/ActiveDOMCallback.h"
-#include "bindings/v8/DOMWrapperWorld.h"
-#include "bindings/v8/ScopedPersistent.h"
+#ifndef {{v8_class_name}}_h
+#define {{v8_class_name}}_h
+{{conditional_if}}
+{% for filename in includes -%}
+#include "{{filename}}"
+{% endfor %}
namespace WebCore {
class ScriptExecutionContext;
-class V8TestCallback : public TestCallback, public ActiveDOMCallback {
+class {{v8_class_name}} : public {{interface_name}}, public ActiveDOMCallback {
public:
- static PassRefPtr<V8TestCallback> create(v8::Handle<v8::Value> value, ScriptExecutionContext* context)
+ static PassRefPtr<{{v8_class_name}}> create(v8::Handle<v8::Value> value, ScriptExecutionContext* context)
{
ASSERT(value->IsObject());
ASSERT(context);
- return adoptRef(new V8TestCallback(v8::Handle<v8::Object>::Cast(value), context));
+ return adoptRef(new {{v8_class_name}}(v8::Handle<v8::Object>::Cast(value), context));
}
- virtual ~V8TestCallback();
+ virtual ~{{v8_class_name}}();
// Functions
- virtual bool callbackWithNoParam();
- virtual bool callbackWithTestObjectParam(TestObj* class1Param);
- virtual bool callbackWithTestObjectParam(TestObj* class2Param, const String& strArg);
- virtual int customCallback(TestObj* testObjParam, TestObj* testObjParam);
- virtual bool callbackWithStringList(RefPtr<DOMStringList> listParam);
- virtual bool callbackWithBoolean(bool boolParam);
- virtual bool callbackWithSequence(Vector<RefPtr<TestObj> > sequenceParam);
-
+{% for definition in class_public_definitions -%}
+{{definition | indent(4, true)}}
+{% endfor %}
virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextLifecycleObserver::scriptExecutionContext(); }
private:
- V8TestCallback(v8::Handle<v8::Object>, ScriptExecutionContext*);
+ {{v8_class_name}}(v8::Handle<v8::Object>, ScriptExecutionContext*);
ScopedPersistent<v8::Object> m_callback;
RefPtr<DOMWrapperWorld> m_world;
@@ -62,5 +56,8 @@ private:
}
-#endif // V8TestCallback_h
+{{conditional_endif}}
+
+#endif // {{v8_class_name}}_h
+
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/scripts/callbackImplementation.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698