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

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

Issue 1855363002: DevTools: [ux regression] There is no way to clear console history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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/ConsolePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js b/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
index fae8e4491c6c746bd78701ccade981d121e4421f..47a5027db527937ed338034f0e311c8604777194 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
@@ -33,18 +33,7 @@
WebInspector.ConsolePanel = function()
{
WebInspector.Panel.call(this, "console");
- this._view = WebInspector.ConsolePanel._view();
-}
-
-/**
- * @return {!WebInspector.ConsoleView}
- */
-WebInspector.ConsolePanel._view = function()
-{
- if (!WebInspector.ConsolePanel._consoleView)
- WebInspector.ConsolePanel._consoleView = new WebInspector.ConsoleView();
-
- return WebInspector.ConsolePanel._consoleView;
+ this._view = WebInspector.ConsoleView.instance();
}
WebInspector.ConsolePanel.prototype = {
@@ -86,7 +75,7 @@ WebInspector.ConsolePanel.prototype = {
*/
searchableView: function()
{
- return WebInspector.ConsolePanel._view().searchableView();
+ return WebInspector.ConsoleView.instance().searchableView();
},
__proto__: WebInspector.Panel.prototype
@@ -103,7 +92,7 @@ WebInspector.ConsolePanel.WrapperView = function()
WebInspector.ConsolePanel.WrapperView._instance = this;
- this._view = WebInspector.ConsolePanel._view();
+ this._view = WebInspector.ConsoleView.instance();
}
WebInspector.ConsolePanel.WrapperView.prototype = {
@@ -158,7 +147,7 @@ WebInspector.ConsolePanel.ConsoleRevealer.prototype = {
*/
reveal: function(object)
{
- var consoleView = WebInspector.ConsolePanel._view();
+ var consoleView = WebInspector.ConsoleView.instance();
if (consoleView.isShowing()) {
consoleView.focus();
return Promise.resolve();

Powered by Google App Engine
This is Rietveld 408576698