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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp

Issue 2730183003: bindings: Add C++ versions of WebIDL types and generalize NativeValueTraits. (Closed)
Patch Set: Move specialization for SerializedScriptValue to the appropriate header Created 3 years, 9 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
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. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
10 10
11 // clang-format off 11 // clang-format off
12 #include "BooleanOrString.h" 12 #include "BooleanOrString.h"
13 13
14 #include "bindings/core/v8/IDLTypes.h"
15 #include "bindings/core/v8/NativeValueTraitsImpl.h"
14 #include "bindings/core/v8/ToV8.h" 16 #include "bindings/core/v8/ToV8.h"
15 17
16 namespace blink { 18 namespace blink {
17 19
18 BooleanOrString::BooleanOrString() : m_type(SpecificTypeNone) {} 20 BooleanOrString::BooleanOrString() : m_type(SpecificTypeNone) {}
19 21
20 bool BooleanOrString::getAsBoolean() const { 22 bool BooleanOrString::getAsBoolean() const {
21 DCHECK(isBoolean()); 23 DCHECK(isBoolean());
22 return m_boolean; 24 return m_boolean;
23 } 25 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return v8::Local<v8::Value>(); 95 return v8::Local<v8::Value>();
94 } 96 }
95 97
96 BooleanOrString NativeValueTraits<BooleanOrString>::nativeValue(v8::Isolate* iso late, v8::Local<v8::Value> value, ExceptionState& exceptionState) { 98 BooleanOrString NativeValueTraits<BooleanOrString>::nativeValue(v8::Isolate* iso late, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
97 BooleanOrString impl; 99 BooleanOrString impl;
98 V8BooleanOrString::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNu llable, exceptionState); 100 V8BooleanOrString::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNu llable, exceptionState);
99 return impl; 101 return impl;
100 } 102 }
101 103
102 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698