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

Unified Diff: Source/core/inspector/CodeGeneratorInstrumentation.py

Issue 376213002: DevTools: Make FrameConsole methods accept ConsoleMessage objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scriptFailedToParse
Patch Set: Created 6 years, 4 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 | « Source/core/frame/UseCounter.cpp ('k') | Source/core/inspector/ConsoleMessage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/CodeGeneratorInstrumentation.py
diff --git a/Source/core/inspector/CodeGeneratorInstrumentation.py b/Source/core/inspector/CodeGeneratorInstrumentation.py
index c7e8e98e8662305cf255d8e2b02cbd371555f5d6..aa0335e6bc24b57d2c3cfb493dfb1b2bbfdc89ad 100755
--- a/Source/core/inspector/CodeGeneratorInstrumentation.py
+++ b/Source/core/inspector/CodeGeneratorInstrumentation.py
@@ -41,6 +41,8 @@ ${includes}
namespace blink {
+${forward_declarations}
+
namespace InspectorInstrumentation {
$methods
@@ -202,6 +204,7 @@ class File:
self.name = name
self.header_name = self.name + "Inl"
self.includes = [include_inspector_header("InspectorInstrumentation")]
+ self.forward_declarations = []
self.declarations = []
for line in map(str.strip, source.split("\n")):
line = re.sub("\s{2,}", " ", line).strip() # Collapse whitespace
@@ -209,9 +212,12 @@ class File:
continue
if line[0] == "#":
self.includes.append(line)
+ elif line.startswith("class "):
+ self.forward_declarations.append(line)
else:
self.declarations.append(Method(line))
self.includes.sort()
+ self.forward_declarations.sort()
def generate(self, cpp_lines, used_agents):
header_lines = []
@@ -224,6 +230,7 @@ class File:
return template_h.substitute(None,
file_name=self.header_name,
includes="\n".join(self.includes),
+ forward_declarations="\n".join(self.forward_declarations),
methods="\n".join(header_lines))
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/inspector/ConsoleMessage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698