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

Unified Diff: Source/bindings/tests/results/V8TestSupportTestInterface.h

Issue 24053003: Support partial interface for test support idls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove hardcoding Created 7 years, 3 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
Index: Source/bindings/tests/results/V8TestSupportTestInterface.h
diff --git a/Source/bindings/tests/results/V8TestInterface.h b/Source/bindings/tests/results/V8TestSupportTestInterface.h
similarity index 61%
copy from Source/bindings/tests/results/V8TestInterface.h
copy to Source/bindings/tests/results/V8TestSupportTestInterface.h
index 6013dfa6077c0ac327571e29894d61a3926859ad..9626e79d6774a64898cca3ae44f0df15397bbc0f 100644
--- a/Source/bindings/tests/results/V8TestInterface.h
+++ b/Source/bindings/tests/results/V8TestSupportTestInterface.h
@@ -18,143 +18,134 @@
Boston, MA 02111-1307, USA.
*/
-#ifndef V8TestInterface_h
-#define V8TestInterface_h
+#ifndef V8TestSupportTestInterface_h
+#define V8TestSupportTestInterface_h
-#if ENABLE(Condition1) || ENABLE(Condition2)
-#include "bindings/tests/idls/TestInterface.h"
+#include "bindings/tests/idls/testing/TestSupportTestInterface.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMWrapper.h"
#include "bindings/v8/WrapperTypeInfo.h"
namespace WebCore {
-class V8TestInterface {
+class V8TestSupportTestInterface {
public:
static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldType);
static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWorldType);
- static TestInterface* toNative(v8::Handle<v8::Object> object)
+ static TestSupportTestInterface* toNative(v8::Handle<v8::Object> object)
{
return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
}
static void derefObject(void*);
static WrapperTypeInfo info;
- static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
-#if ENABLE(Condition22) || ENABLE(Condition23)
- static void implementsMethod3MethodCustom(const v8::FunctionCallbackInfo<v8::Value>&);
-#endif // ENABLE(Condition22) || ENABLE(Condition23)
#if ENABLE(Condition11) || ENABLE(Condition12)
static void supplementalMethod3MethodCustom(const v8::FunctionCallbackInfo<v8::Value>&);
#endif // ENABLE(Condition11) || ENABLE(Condition12)
- static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
- static inline void* toInternalPointer(TestInterface* impl)
+ static inline void* toInternalPointer(TestSupportTestInterface* impl)
{
return impl;
}
- static inline TestInterface* fromInternalPointer(void* object)
+ static inline TestSupportTestInterface* fromInternalPointer(void* object)
{
- return static_cast<TestInterface*>(object);
+ return static_cast<TestSupportTestInterface*>(object);
}
- static void installPerContextProperties(v8::Handle<v8::Object>, TestInterface*, v8::Isolate*);
+ static void installPerContextProperties(v8::Handle<v8::Object>, TestSupportTestInterface*, v8::Isolate*);
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
private:
- friend v8::Handle<v8::Object> wrap(TestInterface*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
- static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+ friend v8::Handle<v8::Object> wrap(TestSupportTestInterface*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+ static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestSupportTestInterface>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
};
template<>
-class WrapperTypeTraits<TestInterface > {
+class WrapperTypeTraits<TestSupportTestInterface > {
public:
- static WrapperTypeInfo* info() { return &V8TestInterface::info; }
+ static WrapperTypeInfo* info() { return &V8TestSupportTestInterface::info; }
};
-inline v8::Handle<v8::Object> wrap(TestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+inline v8::Handle<v8::Object> wrap(TestSupportTestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8TestInterface>(impl, isolate));
- return V8TestInterface::createWrapper(impl, creationContext, isolate);
+ ASSERT(!DOMDataStore::containsWrapper<V8TestSupportTestInterface>(impl, isolate));
+ return V8TestSupportTestInterface::createWrapper(impl, creationContext, isolate);
}
-inline v8::Handle<v8::Value> toV8(TestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+inline v8::Handle<v8::Value> toV8(TestSupportTestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
if (UNLIKELY(!impl))
return v8NullWithCheck(isolate);
- v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterface>(impl, isolate);
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestSupportTestInterface>(impl, isolate);
if (!wrapper.IsEmpty())
return wrapper;
return wrap(impl, creationContext, isolate);
}
template<typename CallbackInfo>
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface* impl, v8::Handle<v8::Object> creationContext)
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestSupportTestInterface* impl, v8::Handle<v8::Object> creationContext)
{
if (UNLIKELY(!impl)) {
v8SetReturnValueNull(callbackInfo);
return;
}
- if (DOMDataStore::setReturnValueFromWrapper<V8TestInterface>(callbackInfo.GetReturnValue(), impl))
+ if (DOMDataStore::setReturnValueFromWrapper<V8TestSupportTestInterface>(callbackInfo.GetReturnValue(), impl))
return;
v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.GetIsolate());
v8SetReturnValue(callbackInfo, wrapper);
}
template<typename CallbackInfo>
-inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterface* impl, v8::Handle<v8::Object> creationContext)
+inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestSupportTestInterface* impl, v8::Handle<v8::Object> creationContext)
{
ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl)) {
v8SetReturnValueNull(callbackInfo);
return;
}
- if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterface>(callbackInfo.GetReturnValue(), impl))
+ if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestSupportTestInterface>(callbackInfo.GetReturnValue(), impl))
return;
v8::Handle<v8::Value> wrapper = wrap(impl, creationContext, callbackInfo.GetIsolate());
v8SetReturnValue(callbackInfo, wrapper);
}
template<class CallbackInfo, class Wrappable>
-inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface* impl, Wrappable* wrappable)
+inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestSupportTestInterface* impl, Wrappable* wrappable)
{
if (UNLIKELY(!impl)) {
v8SetReturnValueNull(callbackInfo);
return;
}
- if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterface>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
+ if (DOMDataStore::setReturnValueFromWrapperFast<V8TestSupportTestInterface>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
return;
v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
v8SetReturnValue(callbackInfo, wrapper);
}
-inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+inline v8::Handle<v8::Value> toV8(PassRefPtr<TestSupportTestInterface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
return toV8(impl.get(), creationContext, isolate);
}
template<class CallbackInfo>
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface > impl, v8::Handle<v8::Object> creationContext)
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestSupportTestInterface > impl, v8::Handle<v8::Object> creationContext)
{
v8SetReturnValue(callbackInfo, impl.get(), creationContext);
}
template<class CallbackInfo>
-inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface > impl, v8::Handle<v8::Object> creationContext)
+inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestSupportTestInterface > impl, v8::Handle<v8::Object> creationContext)
{
v8SetReturnValueForMainWorld(callbackInfo, impl.get(), creationContext);
}
template<class CallbackInfo, class Wrappable>
-inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface > impl, Wrappable* wrappable)
+inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestSupportTestInterface > impl, Wrappable* wrappable)
{
v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
}
}
-#endif // ENABLE(Condition1) || ENABLE(Condition2)
-
-#endif // V8TestInterface_h
+#endif // V8TestSupportTestInterface_h

Powered by Google App Engine
This is Rietveld 408576698