| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Resources.ServiceWorkerCacheView = class extends UI.SimpleView { | 7 Resources.ServiceWorkerCacheView = class extends UI.SimpleView { |
| 8 /** | 8 /** |
| 9 * @param {!SDK.ServiceWorkerCacheModel} model | 9 * @param {!SDK.ServiceWorkerCacheModel} model |
| 10 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache | 10 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @return {!DataGrid.DataGrid} | 34 * @return {!DataGrid.DataGrid} |
| 35 */ | 35 */ |
| 36 _createDataGrid() { | 36 _createDataGrid() { |
| 37 var columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([ | 37 var columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([ |
| 38 {id: 'number', title: Common.UIString('#'), width: '50px'}, {id: 'request'
, title: Common.UIString('Request')}, | 38 {id: 'number', title: Common.UIString('#'), width: '50px'}, {id: 'request'
, title: Common.UIString('Request')}, |
| 39 {id: 'response', title: Common.UIString('Response')} | 39 {id: 'response', title: Common.UIString('Response')} |
| 40 ]); | 40 ]); |
| 41 return new DataGrid.DataGrid( | 41 var dataGrid = new DataGrid.DataGrid( |
| 42 columns, undefined, this._deleteButtonClicked.bind(this), this._updateDa
ta.bind(this, true)); | 42 columns, undefined, this._deleteButtonClicked.bind(this), this._updateDa
ta.bind(this, true)); |
| 43 dataGrid.setStriped(true); |
| 44 return dataGrid; |
| 43 } | 45 } |
| 44 | 46 |
| 45 _createEditorToolbar() { | 47 _createEditorToolbar() { |
| 46 var editorToolbar = new UI.Toolbar('data-view-toolbar', this.element); | 48 var editorToolbar = new UI.Toolbar('data-view-toolbar', this.element); |
| 47 | 49 |
| 48 this._pageBackButton = new UI.ToolbarButton(Common.UIString('Show previous p
age'), 'largeicon-play-back'); | 50 this._pageBackButton = new UI.ToolbarButton(Common.UIString('Show previous p
age'), 'largeicon-play-back'); |
| 49 this._pageBackButton.addEventListener(UI.ToolbarButton.Events.Click, this._p
ageBackButtonClicked, this); | 51 this._pageBackButton.addEventListener(UI.ToolbarButton.Events.Click, this._p
ageBackButtonClicked, this); |
| 50 editorToolbar.appendToolbarItem(this._pageBackButton); | 52 editorToolbar.appendToolbarItem(this._pageBackButton); |
| 51 | 53 |
| 52 this._pageForwardButton = new UI.ToolbarButton(Common.UIString('Show next pa
ge'), 'largeicon-play'); | 54 this._pageForwardButton = new UI.ToolbarButton(Common.UIString('Show next pa
ge'), 'largeicon-play'); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 */ | 150 */ |
| 149 syncToolbarItems() { | 151 syncToolbarItems() { |
| 150 return [this._refreshButton]; | 152 return [this._refreshButton]; |
| 151 } | 153 } |
| 152 | 154 |
| 153 clear() { | 155 clear() { |
| 154 this._dataGrid.rootNode().removeChildren(); | 156 this._dataGrid.rootNode().removeChildren(); |
| 155 this._entries = []; | 157 this._entries = []; |
| 156 } | 158 } |
| 157 }; | 159 }; |
| OLD | NEW |