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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements Created 4 years, 5 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
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index 0dc00e4774fac1a6908ffc2f0fae498fb2ef4f18..40316c05e543df603171eedb85789bd3e27676b8 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -1301,6 +1301,14 @@ WebInspector.ConsoleView.instance = function()
return WebInspector.ConsoleView._instance;
}
+WebInspector.ConsoleView.clearConsole = function()
+{
+ for (var target of WebInspector.targetManager.targets()) {
+ target.runtimeModel.discardConsoleEntries();
+ target.consoleModel.requestClearMessages();
+ }
+}
+
/**
* @constructor
* @implements {WebInspector.ActionDelegate}
@@ -1323,7 +1331,7 @@ WebInspector.ConsoleView.ActionDelegate.prototype = {
WebInspector.console.show();
return true;
case "console.clear":
- WebInspector.ConsoleModel.clearConsole();
+ WebInspector.ConsoleView.clearConsole();
return true;
case "console.clear.history":
WebInspector.ConsoleView.instance()._clearHistory();

Powered by Google App Engine
This is Rietveld 408576698