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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h

Issue 2452403002: [Bindings] Reformat template files (4/4) (Closed)
Patch Set: Rebase Created 4 years, 2 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: third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h b/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h
index 5700480c869d94444ec82d5ec783c5d5e1aeeea8..fa5e88c414d464442b4e22d873f086732dbc016f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.h
@@ -17,59 +17,58 @@
namespace blink {
class CORE_EXPORT UnrestrictedDoubleOrString final {
- DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-public:
- UnrestrictedDoubleOrString();
- bool isNull() const { return m_type == SpecificTypeNone; }
-
- bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestrictedDouble; }
- double getAsUnrestrictedDouble() const;
- void setUnrestrictedDouble(double);
- static UnrestrictedDoubleOrString fromUnrestrictedDouble(double);
-
- bool isString() const { return m_type == SpecificTypeString; }
- String getAsString() const;
- void setString(String);
- static UnrestrictedDoubleOrString fromString(String);
-
- UnrestrictedDoubleOrString(const UnrestrictedDoubleOrString&);
- ~UnrestrictedDoubleOrString();
- UnrestrictedDoubleOrString& operator=(const UnrestrictedDoubleOrString&);
- DECLARE_TRACE();
-
-private:
- enum SpecificTypes {
- SpecificTypeNone,
- SpecificTypeUnrestrictedDouble,
- SpecificTypeString,
- };
- SpecificTypes m_type;
-
- double m_unrestrictedDouble;
- String m_string;
-
- friend CORE_EXPORT v8::Local<v8::Value> toV8(const UnrestrictedDoubleOrString&, v8::Local<v8::Object>, v8::Isolate*);
+ DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
+ public:
+ UnrestrictedDoubleOrString();
+ bool isNull() const { return m_type == SpecificTypeNone; }
+
+ bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestrictedDouble; }
+ double getAsUnrestrictedDouble() const;
+ void setUnrestrictedDouble(double);
+ static UnrestrictedDoubleOrString fromUnrestrictedDouble(double);
+
+ bool isString() const { return m_type == SpecificTypeString; }
+ String getAsString() const;
+ void setString(String);
+ static UnrestrictedDoubleOrString fromString(String);
+
+ UnrestrictedDoubleOrString(const UnrestrictedDoubleOrString&);
+ ~UnrestrictedDoubleOrString();
+ UnrestrictedDoubleOrString& operator=(const UnrestrictedDoubleOrString&);
+ DECLARE_TRACE();
+
+ private:
+ enum SpecificTypes {
+ SpecificTypeNone,
+ SpecificTypeUnrestrictedDouble,
+ SpecificTypeString,
+ };
+ SpecificTypes m_type;
+
+ double m_unrestrictedDouble;
+ String m_string;
+
+ friend CORE_EXPORT v8::Local<v8::Value> toV8(const UnrestrictedDoubleOrString&, v8::Local<v8::Object>, v8::Isolate*);
};
class V8UnrestrictedDoubleOrString final {
-public:
- CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, UnrestrictedDoubleOrString&, UnionTypeConversionMode, ExceptionState&);
+ public:
+ CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, UnrestrictedDoubleOrString&, UnionTypeConversionMode, ExceptionState&);
};
CORE_EXPORT v8::Local<v8::Value> toV8(const UnrestrictedDoubleOrString&, v8::Local<v8::Object>, v8::Isolate*);
template <class CallbackInfo>
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnrestrictedDoubleOrString& impl)
-{
- v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnrestrictedDoubleOrString& impl) {
+ v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
template <>
struct NativeValueTraits<UnrestrictedDoubleOrString> {
- CORE_EXPORT static UnrestrictedDoubleOrString nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
+ CORE_EXPORT static UnrestrictedDoubleOrString nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
};
-} // namespace blink
+} // namespace blink
// We need to set canInitializeWithMemset=true because HeapVector supports
// items that can initialize with memset or have a vtable. It is safe to
@@ -77,4 +76,4 @@ struct NativeValueTraits<UnrestrictedDoubleOrString> {
// See https://codereview.chromium.org/1118993002/#msg5 for more details.
WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::UnrestrictedDoubleOrString);
-#endif // UnrestrictedDoubleOrString_h
+#endif // UnrestrictedDoubleOrString_h

Powered by Google App Engine
This is Rietveld 408576698