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

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 63643002: IDL compiler: [ImplementedAs] for methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 5204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5215 imp->doNotCheckSignatureVoidMethod(); 5215 imp->doNotCheckSignatureVoidMethod();
5216 } 5216 }
5217 5217
5218 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 5218 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
5219 { 5219 {
5220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5221 TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethod(info); 5221 TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethod(info);
5222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5223 } 5223 }
5224 5224
5225 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5226 {
5227 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5228 imp->implementedAsMethodName();
5229 }
5230
5231 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5232 {
5233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5234 TestObjectPythonV8Internal::implementedAsVoidMethodMethod(info);
5235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5236 }
5237
5225 } // namespace TestObjectPythonV8Internal 5238 } // namespace TestObjectPythonV8Internal
5226 5239
5227 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = { 5240 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = {
5228 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 5241 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
5229 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonly TestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 5242 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonly TestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
5230 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 5243 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
5231 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */}, 5244 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
5232 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */}, 5245 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
5233 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTim eStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 5246 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTim eStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
5234 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */}, 5247 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
5441 #endif // ENABLE(Condition) 5454 #endif // ENABLE(Condition)
5442 #if ENABLE(Condition1) && ENABLE(Condition2) 5455 #if ENABLE(Condition1) && ENABLE(Condition2)
5443 {"conditionalCondition1AndCondition2VoidMethod", TestObjectPythonV8Internal: :conditionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0}, 5456 {"conditionalCondition1AndCondition2VoidMethod", TestObjectPythonV8Internal: :conditionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0},
5444 #endif // ENABLE(Condition1) && ENABLE(Condition2) 5457 #endif // ENABLE(Condition1) && ENABLE(Condition2)
5445 {"customVoidMethod", TestObjectPythonV8Internal::customVoidMethodMethodCallb ack, 0, 0}, 5458 {"customVoidMethod", TestObjectPythonV8Internal::customVoidMethodMethodCallb ack, 0, 0},
5446 #if ENABLE(Condition) 5459 #if ENABLE(Condition)
5447 {"conditionalConditionCustomVoidMethod", TestObjectPythonV8Internal::conditi onalConditionCustomVoidMethodMethodCallback, 0, 0}, 5460 {"conditionalConditionCustomVoidMethod", TestObjectPythonV8Internal::conditi onalConditionCustomVoidMethodMethodCallback, 0, 0},
5448 #endif // ENABLE(Condition) 5461 #endif // ENABLE(Condition)
5449 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customEleme ntCallbacksVoidMethodMethodCallback, 0, 0}, 5462 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customEleme ntCallbacksVoidMethodMethodCallback, 0, 0},
5450 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMet hodCallback, 0, 0}, 5463 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMet hodCallback, 0, 0},
5464 {"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMet hodMethodCallback, 0, 0},
5451 }; 5465 };
5452 5466
5453 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType) 5467 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType)
5454 { 5468 {
5455 desc->ReadOnlyPrototype(); 5469 desc->ReadOnlyPrototype();
5456 5470
5457 v8::Local<v8::Signature> defaultSignature; 5471 v8::Local<v8::Signature> defaultSignature;
5458 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount, 5472 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount,
5459 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes), 5473 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
5460 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods), 5474 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods),
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
5647 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 5661 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT ypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
5648 return wrapper; 5662 return wrapper;
5649 } 5663 }
5650 5664
5651 void V8TestObjectPython::derefObject(void* object) 5665 void V8TestObjectPython::derefObject(void* object)
5652 { 5666 {
5653 fromInternalPointer(object)->deref(); 5667 fromInternalPointer(object)->deref();
5654 } 5668 }
5655 5669
5656 } // namespace WebCore 5670 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698