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

Unified Diff: third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py

Issue 2450973002: [DevTools] Inherit WI.Target from Protocol.Target. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/compile_frontend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py
diff --git a/third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py b/third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py
index 68a6afc1b0da3854a5e104fb5b30ebcfad73c831..e752c9a3c097cc82b48a21d6bf985d1923a95c47 100755
--- a/third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py
+++ b/third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py
@@ -50,6 +50,7 @@ promisified_domains = {
"Browser",
"CSS",
"Emulation",
+ "HeapProfiler",
"Profiler",
"LayerTree"
}
@@ -112,15 +113,6 @@ def generate_protocol_externs(output_path, file1, file2):
load_schema(file2, domains)
output_file = open(output_path, "w")
- output_file.write(
-"""
-var InspectorBackend = {}
-
-var Protocol = {};
-/** @typedef {string}*/
-Protocol.Error;
-""")
-
for domain in domains:
domain_name = domain["domain"]
if "types" in domain:
@@ -226,10 +218,6 @@ Protocol.Error;
output_file.write(" */\n")
output_file.write("%sAgent.Dispatcher.prototype.%s = function(%s) {};\n" % (domain_name, event["name"], ", ".join(params)))
- output_file.write("\n/** @constructor\n * @param {!Object.<string, !Object>} agentsMap\n */\n")
- output_file.write("Protocol.Agents = function(agentsMap){this._agentsMap;};\n")
- output_file.write("/**\n * @param {string} domain\n * @param {!Object} dispatcher\n */\n")
- output_file.write("Protocol.Agents.prototype.registerDispatcher = function(domain, dispatcher){};\n")
for domain in domains:
domain_name = domain["domain"]
uppercase_length = 0
@@ -237,10 +225,10 @@ Protocol.Error;
uppercase_length += 1
output_file.write("/** @return {!Protocol.%sAgent}*/\n" % domain_name)
- output_file.write("Protocol.Agents.prototype.%s = function(){};\n" % (domain_name[:uppercase_length].lower() + domain_name[uppercase_length:] + "Agent"))
+ output_file.write("Protocol.Target.prototype.%s = function(){};\n" % (domain_name[:uppercase_length].lower() + domain_name[uppercase_length:] + "Agent"))
output_file.write("/**\n * @param {!%sAgent.Dispatcher} dispatcher\n */\n" % domain_name)
- output_file.write("Protocol.Agents.prototype.register%sDispatcher = function(dispatcher) {}\n" % domain_name)
+ output_file.write("Protocol.Target.prototype.register%sDispatcher = function(dispatcher) {}\n" % domain_name)
output_file.close()
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/compile_frontend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698