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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.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/StringOrDouble.h
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h b/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h
index 0f11451739a53cdb7bb004d602ea4514a6146c8f..3fa14d14f1d74627fc34cd4f150701f1a5449a44 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h
@@ -17,59 +17,58 @@
namespace blink {
class CORE_EXPORT StringOrDouble final {
- DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-public:
- StringOrDouble();
- bool isNull() const { return m_type == SpecificTypeNone; }
-
- bool isString() const { return m_type == SpecificTypeString; }
- String getAsString() const;
- void setString(String);
- static StringOrDouble fromString(String);
-
- bool isDouble() const { return m_type == SpecificTypeDouble; }
- double getAsDouble() const;
- void setDouble(double);
- static StringOrDouble fromDouble(double);
-
- StringOrDouble(const StringOrDouble&);
- ~StringOrDouble();
- StringOrDouble& operator=(const StringOrDouble&);
- DECLARE_TRACE();
-
-private:
- enum SpecificTypes {
- SpecificTypeNone,
- SpecificTypeString,
- SpecificTypeDouble,
- };
- SpecificTypes m_type;
-
- String m_string;
- double m_double;
-
- friend CORE_EXPORT v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isolate*);
+ DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
+ public:
+ StringOrDouble();
+ bool isNull() const { return m_type == SpecificTypeNone; }
+
+ bool isString() const { return m_type == SpecificTypeString; }
+ String getAsString() const;
+ void setString(String);
+ static StringOrDouble fromString(String);
+
+ bool isDouble() const { return m_type == SpecificTypeDouble; }
+ double getAsDouble() const;
+ void setDouble(double);
+ static StringOrDouble fromDouble(double);
+
+ StringOrDouble(const StringOrDouble&);
+ ~StringOrDouble();
+ StringOrDouble& operator=(const StringOrDouble&);
+ DECLARE_TRACE();
+
+ private:
+ enum SpecificTypes {
+ SpecificTypeNone,
+ SpecificTypeString,
+ SpecificTypeDouble,
+ };
+ SpecificTypes m_type;
+
+ String m_string;
+ double m_double;
+
+ friend CORE_EXPORT v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isolate*);
};
class V8StringOrDouble final {
-public:
- CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, StringOrDouble&, UnionTypeConversionMode, ExceptionState&);
+ public:
+ CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, StringOrDouble&, UnionTypeConversionMode, ExceptionState&);
};
CORE_EXPORT v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isolate*);
template <class CallbackInfo>
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& impl)
-{
- v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& impl) {
+ v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
template <>
struct NativeValueTraits<StringOrDouble> {
- CORE_EXPORT static StringOrDouble nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
+ CORE_EXPORT static StringOrDouble 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<StringOrDouble> {
// See https://codereview.chromium.org/1118993002/#msg5 for more details.
WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::StringOrDouble);
-#endif // StringOrDouble_h
+#endif // StringOrDouble_h

Powered by Google App Engine
This is Rietveld 408576698