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

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

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
Index: Source/bindings/tests/results/modules/UnionTypesModules.h
diff --git a/Source/bindings/tests/results/modules/UnionTypesModules.h b/Source/bindings/tests/results/modules/UnionTypesModules.h
index 84116568ebe48f18e012d0245d803118fa92fba0..10e1cefb47aeb3fd95383722d76a271baa08f449 100644
--- a/Source/bindings/tests/results/modules/UnionTypesModules.h
+++ b/Source/bindings/tests/results/modules/UnionTypesModules.h
@@ -1,4 +1,4 @@
-// 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.
@@ -7,63 +7,7 @@
#ifndef UnionTypeModules_h
#define UnionTypeModules_h
-#include "bindings/core/v8/Dictionary.h"
-#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/UnionTypesCore.h"
-#include "bindings/core/v8/V8Binding.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-
-class BooleanOrString final {
- ALLOW_ONLY_INLINE_ALLOCATION();
-public:
- BooleanOrString();
- bool isNull() const { return m_type == SpecificTypeNone; }
-
- bool isBoolean() const { return m_type == SpecificTypeBoolean; }
- bool getAsBoolean() const;
- void setBoolean(bool);
- static BooleanOrString fromBoolean(bool);
-
- bool isString() const { return m_type == SpecificTypeString; }
- String getAsString() const;
- void setString(String);
- static BooleanOrString fromString(String);
-
-private:
- enum SpecificTypes {
- SpecificTypeNone,
- SpecificTypeBoolean,
- SpecificTypeString,
- };
- SpecificTypes m_type;
-
- bool m_boolean;
- String m_string;
-
- friend v8::Local<v8::Value> toV8(const BooleanOrString&, v8::Local<v8::Object>, v8::Isolate*);
-};
-
-class V8BooleanOrString final {
-public:
- static void toImpl(v8::Isolate*, v8::Local<v8::Value>, BooleanOrString&, ExceptionState&);
-};
-
-v8::Local<v8::Value> toV8(const BooleanOrString&, v8::Local<v8::Object>, v8::Isolate*);
-
-template <class CallbackInfo>
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrString& impl)
-{
- v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
-}
-
-template <>
-struct NativeValueTraits<BooleanOrString> {
- static BooleanOrString nativeValue(const v8::Local<v8::Value>&, v8::Isolate*, ExceptionState&);
-};
-
-} // namespace blink
+#include "bindings/modules/v8/BooleanOrString.h"
#endif // UnionTypeModules_h
« no previous file with comments | « Source/bindings/tests/results/modules/BooleanOrString.cpp ('k') | Source/bindings/tests/results/modules/UnionTypesModules.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698