Index: third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template |
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template |
index 05ca81d3a5714ec58b7e9b6a00e712f5b93364bf..ed83430a62db794add717bd5dac235fdf751241d 100644 |
--- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template |
+++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template |
@@ -26,6 +26,9 @@ |
{% for name in domain.dependencies %} |
#include "{{output_package}}/{{name}}.h" |
pfeldman
2016/07/22 18:02:40
It should be clear that we explicitly import publi
dgozman
2016/07/22 21:21:19
Done.
|
{% endfor %} |
+{% if domain["has_exports"] %} |
+#include "{{exported_package}}/{{domain.domain}}.h" |
+{% endif %} |
namespace blink { |
namespace protocol { |
@@ -53,7 +56,7 @@ namespace {{type.id}}Enum { |
{% for literal in type.enum %} |
{{export_macro}} extern const char* {{ literal | dash_to_camelcase}}; |
{% endfor %} |
-} // {{type.id}}Enum |
+} // namespace {{type.id}}Enum |
{% endif %} |
{% endfor %} |
{% for command in join_arrays(domain, ["commands", "events"]) %} |
@@ -77,7 +80,8 @@ namespace {{param.name | to_title_case}}Enum { |
{% set type_def = type_definition(domain.domain + "." + type.id)%} |
// {{type.description}} |
-class {{export_macro}} {{type.id}} { |
+class {{export_macro}} {{type.id}} {% if type.exported %}: public Exported::{{type.id}} {% endif %}{ |
+ PROTOCOL_DISALLOW_COPY({{type.id}}); |
public: |
static std::unique_ptr<{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors); |
@@ -103,6 +107,9 @@ public: |
std::unique_ptr<protocol::DictionaryValue> serialize() const; |
std::unique_ptr<{{type.id}}> clone() const; |
+ {% if type.exported %} |
+ String16 toJSONString() const override; |
+ {% endif %} |
template<int STATE> |
class {{type.id}}Builder { |