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

Unified Diff: third_party/inspector_protocol/CodeGenerator.py

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 | « src/inspector/v8-inspector-session-impl.cc ('k') | third_party/inspector_protocol/README.v8 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/inspector_protocol/CodeGenerator.py
diff --git a/third_party/inspector_protocol/CodeGenerator.py b/third_party/inspector_protocol/CodeGenerator.py
index 2bf00276512ff58244336e8020c1f59ad6e1fbf1..dfcbbf6789db1839250f5c600a2443f836c42d5a 100644
--- a/third_party/inspector_protocol/CodeGenerator.py
+++ b/third_party/inspector_protocol/CodeGenerator.py
@@ -8,6 +8,7 @@ import optparse
import collections
import functools
import re
+import copy
try:
import json
except ImportError:
@@ -469,6 +470,20 @@ def main():
protocol.imported_domains = read_protocol_file(config.imported.path, protocol.json_api) if config.imported else []
patch_full_qualified_refs(protocol)
calculate_imports_and_exports(config, protocol)
+
+ for domain in protocol.json_api["domains"]:
+ if "events" in domain:
+ for event in domain["events"]:
+ event_type = dict()
+ event_type["description"] = "Wrapper for notification params"
+ event_type["type"] = "object"
+ event_type["id"] = to_title_case(event["name"]) + "Notification"
+ if "parameters" in event:
+ event_type["properties"] = copy.deepcopy(event["parameters"])
+ if "types" not in domain:
+ domain["types"] = list()
+ domain["types"].append(event_type)
+
create_type_definitions(protocol, "::".join(config.imported.namespace) if config.imported else "")
if not config.exported and len(protocol.exported_domains):
« no previous file with comments | « src/inspector/v8-inspector-session-impl.cc ('k') | third_party/inspector_protocol/README.v8 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698