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

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

Issue 2553043003: [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: rebased 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..fd346033580c18eb6a0cd6ded0b9991a8bafb5d2 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.update, this);
this._bodyElement = this.element.createChild('div', 'vbox watch-expressions');
this._bodyElement.addEventListener('contextmenu', this._contextMenu.bind(this), false);
@@ -82,25 +82,12 @@ 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();
}
/**
- * @param {!Common.Event} event
- */
- _refreshButtonClicked(event) {
- event.consume();
- this.update();
- }
-
- /**
* @override
* @return {!Promise.<?>}
*/

Powered by Google App Engine
This is Rietveld 408576698