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

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

Issue 18112019: Have Window inherit EventTarget interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "bindings/v8/V8DOMActivityLogger.h" 46 #include "bindings/v8/V8DOMActivityLogger.h"
47 #include "bindings/v8/V8DOMConfiguration.h" 47 #include "bindings/v8/V8DOMConfiguration.h"
48 #include "bindings/v8/V8DOMWrapper.h" 48 #include "bindings/v8/V8DOMWrapper.h"
49 #include "bindings/v8/V8EventListenerList.h" 49 #include "bindings/v8/V8EventListenerList.h"
50 #include "bindings/v8/V8HiddenPropertyName.h" 50 #include "bindings/v8/V8HiddenPropertyName.h"
51 #include "bindings/v8/V8ObjectConstructor.h" 51 #include "bindings/v8/V8ObjectConstructor.h"
52 #include "core/dom/ContextFeatures.h" 52 #include "core/dom/ContextFeatures.h"
53 #include "core/dom/CustomElementCallbackDispatcher.h" 53 #include "core/dom/CustomElementCallbackDispatcher.h"
54 #include "core/dom/Document.h" 54 #include "core/dom/Document.h"
55 #include "core/dom/ExceptionCode.h" 55 #include "core/dom/ExceptionCode.h"
56 #include "core/page/DOMWindow.h"
56 #include "core/page/Frame.h" 57 #include "core/page/Frame.h"
57 #include "core/page/PageConsole.h" 58 #include "core/page/PageConsole.h"
58 #include "core/page/UseCounter.h" 59 #include "core/page/UseCounter.h"
59 #include "core/platform/chromium/TraceEvent.h" 60 #include "core/platform/chromium/TraceEvent.h"
60 #include "core/svg/properties/SVGPropertyTearOff.h" 61 #include "core/svg/properties/SVGPropertyTearOff.h"
61 #include "core/svg/properties/SVGStaticPropertyTearOff.h" 62 #include "core/svg/properties/SVGStaticPropertyTearOff.h"
62 #include "wtf/GetPtr.h" 63 #include "wtf/GetPtr.h"
63 #include "wtf/RefCounted.h" 64 #include "wtf/RefCounted.h"
64 #include "wtf/RefPtr.h" 65 #include "wtf/RefPtr.h"
65 #include "wtf/UnusedParam.h" 66 #include "wtf/UnusedParam.h"
(...skipping 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3268 3269
3269 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3270 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3270 { 3271 {
3271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3272 V8TestObject::customMethodWithArgsMethodCustom(args); 3273 V8TestObject::customMethodWithArgsMethodCustom(args);
3273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3274 } 3275 }
3275 3276
3276 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 3277 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
3277 { 3278 {
3279 EventTarget* impl = V8TestObject::toNative(args.Holder());
3280 if (DOMWindow* window = impl->toDOMWindow()) {
3281 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame()))
3282 return;
3283
3284 if (!window->document())
3285 return;
3286 }
3287
3278 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[ 1], false, ListenerFindOrCreate); 3288 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[ 1], false, ListenerFindOrCreate);
3279 if (listener) { 3289 if (listener) {
3280 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, st ringResource, args[0]); 3290 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, st ringResource, args[0]);
3281 V8TestObject::toNative(args.Holder())->addEventListener(stringResource, listener, args[2]->BooleanValue()); 3291 impl->addEventListener(stringResource, listener, args[2]->BooleanValue() );
3282 createHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen erCacheIndex, args.GetIsolate()); 3292 createHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen erCacheIndex, args.GetIsolate());
3283 } 3293 }
3284 } 3294 }
3285 3295
3286 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args) 3296 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args)
3287 { 3297 {
3288 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3289 TestObjV8Internal::addEventListenerMethod(args); 3299 TestObjV8Internal::addEventListenerMethod(args);
3290 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3291 } 3301 }
3292 3302
3293 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 3303 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
3294 { 3304 {
3305 EventTarget* impl = V8TestObject::toNative(args.Holder());
3306 if (DOMWindow* window = impl->toDOMWindow()) {
3307 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame()))
3308 return;
3309
3310 if (!window->document())
3311 return;
3312 }
3313
3295 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[ 1], false, ListenerFindOnly); 3314 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[ 1], false, ListenerFindOnly);
3296 if (listener) { 3315 if (listener) {
3297 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, st ringResource, args[0]); 3316 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, st ringResource, args[0]);
3298 V8TestObject::toNative(args.Holder())->removeEventListener(stringResourc e, listener.get(), args[2]->BooleanValue()); 3317 impl->removeEventListener(stringResource, listener.get(), args[2]->Boole anValue());
3299 removeHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen erCacheIndex, args.GetIsolate()); 3318 removeHiddenDependency(args.Holder(), args[1], V8TestObject::eventListen erCacheIndex, args.GetIsolate());
3300 } 3319 }
3301 } 3320 }
3302 3321
3303 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 3322 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
3304 { 3323 {
3305 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3306 TestObjV8Internal::removeEventListenerMethod(args); 3325 TestObjV8Internal::removeEventListenerMethod(args);
3307 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3326 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3308 } 3327 }
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
5740 installPerContextProperties(wrapper, impl.get(), isolate); 5759 installPerContextProperties(wrapper, impl.get(), isolate);
5741 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent); 5760 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
5742 return wrapper; 5761 return wrapper;
5743 } 5762 }
5744 void V8TestObject::derefObject(void* object) 5763 void V8TestObject::derefObject(void* object)
5745 { 5764 {
5746 fromInternalPointer(object)->deref(); 5765 fromInternalPointer(object)->deref();
5747 } 5766 }
5748 5767
5749 } // namespace WebCore 5768 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698