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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js

Issue 2560553004: Revert of [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/resources/ServiceWorkerCacheViews.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js
index 40124cf3271548ba6b9125039a92c2097efeb11e..d688beee944aab227874c70a98ae64103b9a1266 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js
@@ -21,7 +21,7 @@
this._createEditorToolbar();
this._refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh');
- this._refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._refreshButtonClicked, this);
+ this._refreshButton.addEventListener('click', this._refreshButtonClicked, this);
this._pageSize = 50;
this._skipCount = 0;
@@ -45,27 +45,21 @@
var editorToolbar = new UI.Toolbar('data-view-toolbar', this.element);
this._pageBackButton = new UI.ToolbarButton(Common.UIString('Show previous page'), 'largeicon-play-back');
- this._pageBackButton.addEventListener(UI.ToolbarButton.Events.Click, this._pageBackButtonClicked, this);
+ this._pageBackButton.addEventListener('click', this._pageBackButtonClicked, this);
editorToolbar.appendToolbarItem(this._pageBackButton);
this._pageForwardButton = new UI.ToolbarButton(Common.UIString('Show next page'), 'largeicon-play');
this._pageForwardButton.setEnabled(false);
- this._pageForwardButton.addEventListener(UI.ToolbarButton.Events.Click, this._pageForwardButtonClicked, this);
+ this._pageForwardButton.addEventListener('click', this._pageForwardButtonClicked, this);
editorToolbar.appendToolbarItem(this._pageForwardButton);
}
- /**
- * @param {!Common.Event} event
- */
- _pageBackButtonClicked(event) {
+ _pageBackButtonClicked() {
this._skipCount = Math.max(0, this._skipCount - this._pageSize);
this._updateData(false);
}
- /**
- * @param {!Common.Event} event
- */
- _pageForwardButtonClicked(event) {
+ _pageForwardButtonClicked() {
this._skipCount = this._skipCount + this._pageSize;
this._updateData(false);
}
@@ -134,9 +128,6 @@
this._model.loadCacheData(this._cache, skipCount, pageSize, this._updateDataCallback.bind(this, skipCount));
}
- /**
- * @param {!Common.Event} event
- */
_refreshButtonClicked(event) {
this._updateData(true);
}

Powered by Google App Engine
This is Rietveld 408576698