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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp

Issue 1958623002: Remove TrustedEvents runtime setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/Event.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "V8TestInterfaceEventInitConstructor.h" 7 #include "V8TestInterfaceEventInitConstructor.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/V8DOMConfiguration.h" 10 #include "bindings/core/v8/V8DOMConfiguration.h"
11 #include "bindings/core/v8/V8ObjectConstructor.h" 11 #include "bindings/core/v8/V8ObjectConstructor.h"
12 #include "bindings/core/v8/V8TestInterfaceEventInit.h" 12 #include "bindings/core/v8/V8TestInterfaceEventInit.h"
13 #include "core/dom/Document.h" 13 #include "core/dom/Document.h"
14 #include "core/frame/LocalDOMWindow.h" 14 #include "core/frame/LocalDOMWindow.h"
15 #include "platform/RuntimeEnabledFeatures.h"
16 #include "wtf/GetPtr.h" 15 #include "wtf/GetPtr.h"
17 #include "wtf/RefPtr.h" 16 #include "wtf/RefPtr.h"
18 17
19 namespace blink { 18 namespace blink {
20 19
21 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 20 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
22 // and does not depend on another global objects. 21 // and does not depend on another global objects.
23 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 22 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
24 #pragma clang diagnostic push 23 #pragma clang diagnostic push
25 #pragma clang diagnostic ignored "-Wglobal-constructors" 24 #pragma clang diagnostic ignored "-Wglobal-constructors"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor: :create(type, testInterfaceEventInit); 85 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor: :create(type, testInterfaceEventInit);
87 v8::Local<v8::Object> wrapper = info.Holder(); 86 v8::Local<v8::Object> wrapper = info.Holder();
88 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven tInitConstructor::wrapperTypeInfo, wrapper); 87 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven tInitConstructor::wrapperTypeInfo, wrapper);
89 v8SetReturnValue(info, wrapper); 88 v8SetReturnValue(info, wrapper);
90 } 89 }
91 90
92 } // namespace TestInterfaceEventInitConstructorV8Internal 91 } // namespace TestInterfaceEventInitConstructorV8Internal
93 92
94 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstruc torAccessors[] = { 93 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstruc torAccessors[] = {
95 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 94 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
95 {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttribut eGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8: :DontDelete | v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnInstance, V8DOMConfiguration::CheckHolder},
96 }; 96 };
97 97
98 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function CallbackInfo<v8::Value>& info) 98 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function CallbackInfo<v8::Value>& info)
99 { 99 {
100 if (!info.IsConstructCall()) { 100 if (!info.IsConstructCall()) {
101 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor")); 101 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor"));
102 return; 102 return;
103 } 103 }
104 104
105 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 105 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
(...skipping 11 matching lines...) Expand all
117 interfaceTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::const ructorCallback); 117 interfaceTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::const ructorCallback);
118 interfaceTemplate->SetLength(2); 118 interfaceTemplate->SetLength(2);
119 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate); 119 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate);
120 ALLOW_UNUSED_LOCAL(signature); 120 ALLOW_UNUSED_LOCAL(signature);
121 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance Template(); 121 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance Template();
122 ALLOW_UNUSED_LOCAL(instanceTemplate); 122 ALLOW_UNUSED_LOCAL(instanceTemplate);
123 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototy peTemplate(); 123 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototy peTemplate();
124 ALLOW_UNUSED_LOCAL(prototypeTemplate); 124 ALLOW_UNUSED_LOCAL(prototypeTemplate);
125 // Register DOM constants, attributes and operations. 125 // Register DOM constants, attributes and operations.
126 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterfaceEventInitConstructorA ccessors, WTF_ARRAY_LENGTH(V8TestInterfaceEventInitConstructorAccessors)); 126 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterfaceEventInitConstructorA ccessors, WTF_ARRAY_LENGTH(V8TestInterfaceEventInitConstructorAccessors));
127
128 if (RuntimeEnabledFeatures::trustedEventsEnabled()) {
129 const V8DOMConfiguration::AccessorConfiguration accessorisTrustedConfigu ration = \
130 {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttr ibuteGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::DontDelete | v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnInstance, V8DOMConfiguration::CheckHolder};
131 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, pr ototypeTemplate, interfaceTemplate, signature, accessorisTrustedConfiguration);
132 }
133 } 127 }
134 128
135 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventInitConstructor::domTemplate (v8::Isolate* isolate, const DOMWrapperWorld& world) 129 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventInitConstructor::domTemplate (v8::Isolate* isolate, const DOMWrapperWorld& world)
136 { 130 {
137 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapp erTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceEventInitConstructorTempla te); 131 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapp erTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceEventInitConstructorTempla te);
138 } 132 }
139 133
140 bool V8TestInterfaceEventInitConstructor::hasInstance(v8::Local<v8::Value> v8Val ue, v8::Isolate* isolate) 134 bool V8TestInterfaceEventInitConstructor::hasInstance(v8::Local<v8::Value> v8Val ue, v8::Isolate* isolate)
141 { 135 {
142 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 136 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
143 } 137 }
144 138
145 v8::Local<v8::Object> V8TestInterfaceEventInitConstructor::findInstanceInPrototy peChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) 139 v8::Local<v8::Object> V8TestInterfaceEventInitConstructor::findInstanceInPrototy peChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
146 { 140 {
147 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 141 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
148 } 142 }
149 143
150 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) 144 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
151 { 145 {
152 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 146 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
153 } 147 }
154 148
155 } // namespace blink 149 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698