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 d688beee944aab227874c70a98ae64103b9a1266..40124cf3271548ba6b9125039a92c2097efeb11e 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 @@ Resources.ServiceWorkerCacheView = class extends UI.SimpleView { |
this._createEditorToolbar(); |
this._refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh'); |
- this._refreshButton.addEventListener('click', this._refreshButtonClicked, this); |
+ this._refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._refreshButtonClicked, this); |
this._pageSize = 50; |
this._skipCount = 0; |
@@ -45,21 +45,27 @@ Resources.ServiceWorkerCacheView = class extends UI.SimpleView { |
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('click', this._pageBackButtonClicked, this); |
+ this._pageBackButton.addEventListener(UI.ToolbarButton.Events.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('click', this._pageForwardButtonClicked, this); |
+ this._pageForwardButton.addEventListener(UI.ToolbarButton.Events.Click, this._pageForwardButtonClicked, this); |
editorToolbar.appendToolbarItem(this._pageForwardButton); |
} |
- _pageBackButtonClicked() { |
+ /** |
+ * @param {!Common.Event} event |
+ */ |
+ _pageBackButtonClicked(event) { |
this._skipCount = Math.max(0, this._skipCount - this._pageSize); |
this._updateData(false); |
} |
- _pageForwardButtonClicked() { |
+ /** |
+ * @param {!Common.Event} event |
+ */ |
+ _pageForwardButtonClicked(event) { |
this._skipCount = this._skipCount + this._pageSize; |
this._updateData(false); |
} |
@@ -128,6 +134,9 @@ Resources.ServiceWorkerCacheView = class extends UI.SimpleView { |
this._model.loadCacheData(this._cache, skipCount, pageSize, this._updateDataCallback.bind(this, skipCount)); |
} |
+ /** |
+ * @param {!Common.Event} event |
+ */ |
_refreshButtonClicked(event) { |
this._updateData(true); |
} |