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

Unified Diff: Source/bindings/tests/results/modules/UnionTypesModules.cpp

Issue 953123003: IDL: Put generated union type containers in separate files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/modules/UnionTypesModules.h ('k') | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/modules/UnionTypesModules.cpp
diff --git a/Source/bindings/tests/results/modules/UnionTypesModules.cpp b/Source/bindings/tests/results/modules/UnionTypesModules.cpp
index 6438e18dd44c7c5b7e81fde3f33ddab95f11f56b..3b75a0fb5d037e0f8159aceee5f93a2936fa3d39 100644
--- a/Source/bindings/tests/results/modules/UnionTypesModules.cpp
+++ b/Source/bindings/tests/results/modules/UnionTypesModules.cpp
@@ -1,98 +1,7 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
-#include "config.h"
-#include "bindings/modules/v8/UnionTypesModules.h"
-
-
-namespace blink {
-
-BooleanOrString::BooleanOrString()
- : m_type(SpecificTypeNone)
-{
-}
-
-bool BooleanOrString::getAsBoolean() const
-{
- ASSERT(isBoolean());
- return m_boolean;
-}
-
-void BooleanOrString::setBoolean(bool value)
-{
- ASSERT(isNull());
- m_boolean = value;
- m_type = SpecificTypeBoolean;
-}
-
-BooleanOrString BooleanOrString::fromBoolean(bool value)
-{
- BooleanOrString container;
- container.setBoolean(value);
- return container;
-}
-
-String BooleanOrString::getAsString() const
-{
- ASSERT(isString());
- return m_string;
-}
-
-void BooleanOrString::setString(String value)
-{
- ASSERT(isNull());
- m_string = value;
- m_type = SpecificTypeString;
-}
-
-BooleanOrString BooleanOrString::fromString(String value)
-{
- BooleanOrString container;
- container.setString(value);
- return container;
-}
-
-void V8BooleanOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, BooleanOrString& impl, ExceptionState& exceptionState)
-{
- if (v8Value.IsEmpty())
- return;
-
- if (v8Value->IsBoolean()) {
- impl.setBoolean(v8Value->ToBoolean()->Value());
- return;
- }
-
- {
- TOSTRING_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, v8Value, exceptionState);
- impl.setString(cppValue);
- return;
- }
-
-}
-
-v8::Local<v8::Value> toV8(const BooleanOrString& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
-{
- switch (impl.m_type) {
- case BooleanOrString::SpecificTypeNone:
- return v8::Null(isolate);
- case BooleanOrString::SpecificTypeBoolean:
- return v8Boolean(impl.getAsBoolean(), isolate);
- case BooleanOrString::SpecificTypeString:
- return v8String(isolate, impl.getAsString());
- default:
- ASSERT_NOT_REACHED();
- }
- return v8::Local<v8::Value>();
-}
-
-BooleanOrString NativeValueTraits<BooleanOrString>::nativeValue(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
-{
- BooleanOrString impl;
- V8BooleanOrString::toImpl(isolate, value, impl, exceptionState);
- return impl;
-}
-
-} // namespace blink
+#include "bindings/modules/v8/BooleanOrString.cpp"
« no previous file with comments | « Source/bindings/tests/results/modules/UnionTypesModules.h ('k') | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698