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

Unified Diff: Source/bindings/v8/V8DOMConfiguration.h

Issue 23797002: Hack to add accessors for WebIDL attributes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/code_generator_v8.pm ('k') | Source/bindings/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMConfiguration.h
diff --git a/Source/bindings/v8/V8DOMConfiguration.h b/Source/bindings/v8/V8DOMConfiguration.h
index f7ba8651af8a9c1e16afeb13c12b7d499095ef32..f79ce724465d9bf4644026b440c37cd81ac4b618 100644
--- a/Source/bindings/v8/V8DOMConfiguration.h
+++ b/Source/bindings/v8/V8DOMConfiguration.h
@@ -56,6 +56,19 @@ public:
bool onPrototype;
};
+ // AccessorConfiguration translates into calls to SetAccessorProperty()
+ // on prototype ObjectTemplate.
+ struct AccessorConfiguration {
+ const char* const name;
+ v8::FunctionCallback getter;
+ v8::FunctionCallback setter;
+ v8::FunctionCallback getterForMainWorld;
+ v8::FunctionCallback setterForMainWorld;
+ WrapperTypeInfo* data;
+ v8::AccessControl settings;
+ v8::PropertyAttribute attribute;
+ };
+
static void installAttributes(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::ObjectTemplate>, const AttributeConfiguration*, size_t attributeCount, v8::Isolate*, WrapperWorldType currentWorldType);
template<class ObjectOrTemplate>
@@ -109,7 +122,13 @@ public:
static void installCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const MethodConfiguration*, size_t callbackCount, v8::Isolate*, WrapperWorldType);
- static v8::Local<v8::Signature> installDOMClassTemplate(v8::Handle<v8::FunctionTemplate>, const char* interfaceName, v8::Handle<v8::FunctionTemplate> parentClass, size_t fieldCount, const AttributeConfiguration*, size_t attributeCount, const MethodConfiguration*, size_t callbackCount, v8::Isolate*, WrapperWorldType);
+ static void installAccessors(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, const AccessorConfiguration*, size_t accessorCount, v8::Isolate*, WrapperWorldType);
+
+ static v8::Local<v8::Signature> installDOMClassTemplate(v8::Handle<v8::FunctionTemplate>, const char* interfaceName, v8::Handle<v8::FunctionTemplate> parentClass, size_t fieldCount,
+ const AttributeConfiguration*, size_t attributeCount,
+ const AccessorConfiguration*, size_t accessorCount,
+ const MethodConfiguration*, size_t callbackCount,
+ v8::Isolate*, WrapperWorldType);
};
} // namespace WebCore
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698