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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js

Issue 2553043003: [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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/sources/WatchExpressionsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index 6385a2a01b5b3fb80f49921824044abd8f649456..815c922d39b3eb91192f6783628d7ece0f96da94 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -43,9 +43,9 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget {
this._watchExpressionsSetting = Common.settings.createLocalSetting('watchExpressions', []);
this._addButton = new UI.ToolbarButton(Common.UIString('Add expression'), 'largeicon-add');
- this._addButton.addEventListener('click', this._addButtonClicked.bind(this));
+ this._addButton.addEventListener(UI.ToolbarButton.Events.Click, this._addButtonClicked.bind(this));
this._refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh');
- this._refreshButton.addEventListener('click', this._refreshButtonClicked.bind(this));
+ this._refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._refreshButtonClicked, this);
this._bodyElement = this.element.createChild('div', 'vbox watch-expressions');
this._bodyElement.addEventListener('contextmenu', this._contextMenu.bind(this), false);
@@ -82,12 +82,7 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget {
this._watchExpressionsSetting.set(toSave);
}
- /**
- * @param {!Common.Event=} event
- */
- _addButtonClicked(event) {
- if (event)
- event.consume(true);
+ _addButtonClicked() {
UI.viewManager.showView('sources.watch');
this._createWatchExpression(null).startEditing();
}
@@ -96,7 +91,6 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget {
* @param {!Common.Event} event
*/
_refreshButtonClicked(event) {
- event.consume();
this.update();
lushnikov 2016/12/06 20:21:51 nit: we can just inline this
dgozman 2016/12/06 21:36:16 Done.
}

Powered by Google App Engine
This is Rietveld 408576698