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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Values.h

Issue 2159633002: [DevTools] Generate public versions of protocol classes to be exposed in v8_inspector/public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra files Created 4 years, 5 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/platform/inspector_protocol/Values.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Values.h b/third_party/WebKit/Source/platform/inspector_protocol/Values.h
index 07a2cac9249f47310aec7fdf848cd2620947eb8b..48a2012758a16b7b51297496c9d7ee482e3a4ebb 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Values.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Values.h
@@ -38,7 +38,8 @@ public:
TypeDouble,
TypeString,
TypeObject,
- TypeArray
+ TypeArray,
+ TypeSerialized
};
ValueType type() const { return m_type; }
@@ -49,6 +50,7 @@ public:
virtual bool asDouble(double* output) const;
virtual bool asInteger(int* output) const;
virtual bool asString(String16* output) const;
+ virtual bool asSerialized(String16* output) const;
String16 toJSONString() const;
virtual void writeJSON(String16Builder* output) const;
@@ -123,6 +125,24 @@ private:
String16 m_stringValue;
};
+class PLATFORM_EXPORT SerializedValue : public Value {
+public:
+ static std::unique_ptr<SerializedValue> create(const String16& value)
+ {
+ return wrapUnique(new SerializedValue(value));
+ }
+
+ bool asSerialized(String16* output) const override;
+ void writeJSON(String16Builder* output) const override;
+ std::unique_ptr<Value> clone() const override;
+
+private:
+ explicit SerializedValue(const String16& value) : Value(TypeSerialized), m_serializedValue(value) { }
+ explicit SerializedValue(const char* value) : Value(TypeSerialized), m_serializedValue(value) { }
+
+ String16 m_serializedValue;
+};
+
class PLATFORM_EXPORT DictionaryValue : public Value {
public:
using Entry = std::pair<String16, Value*>;

Powered by Google App Engine
This is Rietveld 408576698