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

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

Issue 22553002: Make EventListener a callback interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/core/dom/EventListener.idl » ('j') | 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 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 25 matching lines...) Expand all
36 #include "V8TestObjectectA.h" 36 #include "V8TestObjectectA.h"
37 #include "V8TestObjectectB.h" 37 #include "V8TestObjectectB.h"
38 #include "V8TestObjectectC.h" 38 #include "V8TestObjectectC.h"
39 #include "V8TestSubObj.h" 39 #include "V8TestSubObj.h"
40 #include "bindings/v8/BindingSecurity.h" 40 #include "bindings/v8/BindingSecurity.h"
41 #include "bindings/v8/Dictionary.h" 41 #include "bindings/v8/Dictionary.h"
42 #include "bindings/v8/ExceptionState.h" 42 #include "bindings/v8/ExceptionState.h"
43 #include "bindings/v8/ScriptController.h" 43 #include "bindings/v8/ScriptController.h"
44 #include "bindings/v8/ScriptValue.h" 44 #include "bindings/v8/ScriptValue.h"
45 #include "bindings/v8/SerializedScriptValue.h" 45 #include "bindings/v8/SerializedScriptValue.h"
46 #include "bindings/v8/V8AbstractEventListener.h"
46 #include "bindings/v8/V8Binding.h" 47 #include "bindings/v8/V8Binding.h"
47 #include "bindings/v8/V8DOMActivityLogger.h" 48 #include "bindings/v8/V8DOMActivityLogger.h"
48 #include "bindings/v8/V8DOMConfiguration.h" 49 #include "bindings/v8/V8DOMConfiguration.h"
49 #include "bindings/v8/V8DOMWrapper.h" 50 #include "bindings/v8/V8DOMWrapper.h"
50 #include "bindings/v8/V8EventListenerList.h" 51 #include "bindings/v8/V8EventListenerList.h"
51 #include "bindings/v8/V8HiddenPropertyName.h" 52 #include "bindings/v8/V8HiddenPropertyName.h"
52 #include "bindings/v8/V8ObjectConstructor.h" 53 #include "bindings/v8/V8ObjectConstructor.h"
53 #include "core/dom/ContextFeatures.h" 54 #include "core/dom/ContextFeatures.h"
54 #include "core/dom/CustomElementCallbackDispatcher.h" 55 #include "core/dom/CustomElementCallbackDispatcher.h"
55 #include "core/dom/Document.h" 56 #include "core/dom/Document.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return; 454 return;
454 } 455 }
455 456
456 static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v 8::Value> value, const v8::PropertyCallbackInfo<void>& info) 457 static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v 8::Value> value, const v8::PropertyCallbackInfo<void>& info)
457 { 458 {
458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
459 TestObjV8Internal::stringAttrAttrSetter(name, value, info); 460 TestObjV8Internal::stringAttrAttrSetter(name, value, info);
460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
461 } 462 }
462 463
464 static void eventListenerAttrAttrGetter(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
465 {
466 TestObj* imp = V8TestObject::toNative(info.Holder());
467 EventListener* listener = imp->eventListenerAttr(isolatedWorldForIsolate(inf o.GetIsolate()));
468 v8SetReturnValue(info, listener ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(listener)->getListenerObject(imp->scriptExecutionContext())) : v8::Han dle<v8::Value>(v8::Null(info.GetIsolate())));
469 return;
470 }
471
472 static void eventListenerAttrAttrGetterCallback(v8::Local<v8::String> name, cons t v8::PropertyCallbackInfo<v8::Value>& info)
473 {
474 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
475 TestObjV8Internal::eventListenerAttrAttrGetter(name, info);
476 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
477 }
478
479 static void eventListenerAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8 ::Value> value, const v8::PropertyCallbackInfo<void>& info)
480 {
481 TestObj* imp = V8TestObject::toNative(info.Holder());
482 transferHiddenDependency(info.Holder(), imp->eventListenerAttr(isolatedWorld ForIsolate(info.GetIsolate())), value, V8TestObject::eventListenerCacheIndex, in fo.GetIsolate());
483 imp->setEventListenerAttr(V8EventListenerList::getEventListener(value, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
484 return;
485 }
486
487 static void eventListenerAttrAttrSetterCallback(v8::Local<v8::String> name, v8:: Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
488 {
489 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
490 TestObjV8Internal::eventListenerAttrAttrSetter(name, value, info);
491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
492 }
493
463 static void testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info) 494 static void testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info)
464 { 495 {
465 TestObj* imp = V8TestObject::toNative(info.Holder()); 496 TestObj* imp = V8TestObject::toNative(info.Holder());
466 v8SetReturnValue(info, toV8Fast(imp->testObjAttr(), info, imp)); 497 v8SetReturnValue(info, toV8Fast(imp->testObjAttr(), info, imp));
467 return; 498 return;
468 } 499 }
469 500
470 static void testObjAttrAttrGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 501 static void testObjAttrAttrGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
471 { 502 {
472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
(...skipping 4780 matching lines...) Expand 10 before | Expand all | Expand 10 after
5253 // Attribute 'unsignedShortAttr' 5284 // Attribute 'unsignedShortAttr'
5254 {"unsignedShortAttr", TestObjV8Internal::unsignedShortAttrAttrGetterCallback , TestObjV8Internal::unsignedShortAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute> (v8::None), 0 /* on instance */}, 5285 {"unsignedShortAttr", TestObjV8Internal::unsignedShortAttrAttrGetterCallback , TestObjV8Internal::unsignedShortAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute> (v8::None), 0 /* on instance */},
5255 // Attribute 'longAttr' 5286 // Attribute 'longAttr'
5256 {"longAttr", TestObjV8Internal::longAttrAttrGetterCallback, TestObjV8Interna l::longAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc e */}, 5287 {"longAttr", TestObjV8Internal::longAttrAttrGetterCallback, TestObjV8Interna l::longAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc e */},
5257 // Attribute 'longLongAttr' 5288 // Attribute 'longLongAttr'
5258 {"longLongAttr", TestObjV8Internal::longLongAttrAttrGetterCallback, TestObjV 8Internal::longLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */}, 5289 {"longLongAttr", TestObjV8Internal::longLongAttrAttrGetterCallback, TestObjV 8Internal::longLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
5259 // Attribute 'unsignedLongLongAttr' 5290 // Attribute 'unsignedLongLongAttr'
5260 {"unsignedLongLongAttr", TestObjV8Internal::unsignedLongLongAttrAttrGetterCa llback, TestObjV8Internal::unsignedLongLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), 0 /* on instance */}, 5291 {"unsignedLongLongAttr", TestObjV8Internal::unsignedLongLongAttrAttrGetterCa llback, TestObjV8Internal::unsignedLongLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), 0 /* on instance */},
5261 // Attribute 'stringAttr' 5292 // Attribute 'stringAttr'
5262 {"stringAttr", TestObjV8Internal::stringAttrAttrGetterCallback, TestObjV8Int ernal::stringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 5293 {"stringAttr", TestObjV8Internal::stringAttrAttrGetterCallback, TestObjV8Int ernal::stringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
5294 // Attribute 'eventListenerAttr'
5295 {"eventListenerAttr", TestObjV8Internal::eventListenerAttrAttrGetterCallback , TestObjV8Internal::eventListenerAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute> (v8::None), 0 /* on instance */},
5263 // Attribute 'testObjAttr' 5296 // Attribute 'testObjAttr'
5264 {"testObjAttr", TestObjV8Internal::testObjAttrAttrGetterCallback, TestObjV8I nternal::testObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::A ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* o n instance */}, 5297 {"testObjAttr", TestObjV8Internal::testObjAttrAttrGetterCallback, TestObjV8I nternal::testObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::A ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* o n instance */},
5265 // Attribute 'XMLObjAttr' 5298 // Attribute 'XMLObjAttr'
5266 {"XMLObjAttr", TestObjV8Internal::XMLObjAttrAttrGetterCallback, TestObjV8Int ernal::XMLObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 5299 {"XMLObjAttr", TestObjV8Internal::XMLObjAttrAttrGetterCallback, TestObjV8Int ernal::XMLObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
5267 // Attribute 'create' 5300 // Attribute 'create'
5268 {"create", TestObjV8Internal::createAttrGetterCallback, TestObjV8Internal::c reateAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 5301 {"create", TestObjV8Internal::createAttrGetterCallback, TestObjV8Internal::c reateAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
5269 // Attribute 'reflectedStringAttr' 5302 // Attribute 'reflectedStringAttr'
5270 {"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCall back, TestObjV8Internal::reflectedStringAttrAttrSetterCallback, 0, 0, 0 /* no da ta */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), 0 /* on instance */}, 5303 {"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCall back, TestObjV8Internal::reflectedStringAttrAttrSetterCallback, 0, 0, 0 /* no da ta */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), 0 /* on instance */},
5271 // Attribute 'reflectedIntegralAttr' 5304 // Attribute 'reflectedIntegralAttr'
5272 {"reflectedIntegralAttr", TestObjV8Internal::reflectedIntegralAttrAttrGetter Callback, TestObjV8Internal::reflectedIntegralAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper tyAttribute>(v8::None), 0 /* on instance */}, 5305 {"reflectedIntegralAttr", TestObjV8Internal::reflectedIntegralAttrAttrGetter Callback, TestObjV8Internal::reflectedIntegralAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper tyAttribute>(v8::None), 0 /* on instance */},
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5731 installPerContextProperties(wrapper, impl.get(), isolate); 5764 installPerContextProperties(wrapper, impl.get(), isolate);
5732 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent); 5765 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
5733 return wrapper; 5766 return wrapper;
5734 } 5767 }
5735 void V8TestObject::derefObject(void* object) 5768 void V8TestObject::derefObject(void* object)
5736 { 5769 {
5737 fromInternalPointer(object)->deref(); 5770 fromInternalPointer(object)->deref();
5738 } 5771 }
5739 5772
5740 } // namespace WebCore 5773 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/core/dom/EventListener.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698