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

Unified Diff: third_party/inspector_protocol/templates/TypeBuilder_h.template

Issue 2523583005: Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48 (Closed)
Patch Set: added default implementation Created 4 years, 1 month 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 | « third_party/inspector_protocol/templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/inspector_protocol/templates/TypeBuilder_h.template
diff --git a/third_party/inspector_protocol/templates/TypeBuilder_h.template b/third_party/inspector_protocol/templates/TypeBuilder_h.template
index 2edf737ee7ae2d18b642c1e482a3242867fd543b..000b2f5f56435e10ced35154b9b0606030ee316d 100644
--- a/third_party/inspector_protocol/templates/TypeBuilder_h.template
+++ b/third_party/inspector_protocol/templates/TypeBuilder_h.template
@@ -71,12 +71,12 @@ namespace {{param.name | to_title_case}}Enum {
{% set type_def = type_definition(domain.domain + "." + type.id)%}
// {{type.description}}
-class {{config.protocol.export_macro}} {{type.id}} {% if type.exported %}: public API::{{type.id}} {% endif %}{
+class {{config.protocol.export_macro}} {{type.id}} : public Serializable{% if type.exported %}, public API::{{type.id}}{% endif %}{
PROTOCOL_DISALLOW_COPY({{type.id}});
public:
- static std::unique_ptr<{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors);
+ static std::unique_ptr<{{type.id}}> fromValue(protocol::Value* value, ErrorSupport* errors);
- ~{{type.id}}() { }
+ ~{{type.id}}() override { }
{% for property in type.properties %}
{% if "enum" in property %}
@@ -96,7 +96,8 @@ public:
void {{"set" | to_method_case}}{{property.name | to_title_case}}({{resolve_type(property).pass_type}} value) { m_{{property.name}} = {{resolve_type(property).to_rvalue % "value"}}; }
{% endfor %}
- std::unique_ptr<protocol::DictionaryValue> serialize() const;
+ std::unique_ptr<protocol::DictionaryValue> toValue() const;
+ String serialize() override { return toValue()->serialize(); }
std::unique_ptr<{{type.id}}> clone() const;
{% if type.exported %}
{{config.exported.string_out}} toJSONString() const override;
« no previous file with comments | « third_party/inspector_protocol/templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698