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

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

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.SimpleView} 7 * @extends {WebInspector.SimpleView}
8 * @param {!WebInspector.ServiceWorkerCacheModel} model 8 * @param {!WebInspector.ServiceWorkerCacheModel} model
9 * @param {!WebInspector.ServiceWorkerCacheModel.Cache} cache 9 * @param {!WebInspector.ServiceWorkerCacheModel.Cache} cache
10 */ 10 */
(...skipping 18 matching lines...) Expand all
29 this.update(cache); 29 this.update(cache);
30 this._entries = []; 30 this._entries = [];
31 }; 31 };
32 32
33 WebInspector.ServiceWorkerCacheView.prototype = { 33 WebInspector.ServiceWorkerCacheView.prototype = {
34 /** 34 /**
35 * @return {!WebInspector.DataGrid} 35 * @return {!WebInspector.DataGrid}
36 */ 36 */
37 _createDataGrid: function() 37 _createDataGrid: function()
38 { 38 {
39 var columns = []; 39 var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor> } */ ([
40 columns.push({id: "number", title: WebInspector.UIString("#"), width: "5 0px"}); 40 {id: "number", title: WebInspector.UIString("#"), width: "50px"},
41 columns.push({id: "request", title: WebInspector.UIString("Request")}); 41 {id: "request", title: WebInspector.UIString("Request")},
42 columns.push({id: "response", title: WebInspector.UIString("Response")}) ; 42 {id: "response", title: WebInspector.UIString("Response")}
43 43 ]);
44 var dataGrid = new WebInspector.DataGrid(columns, undefined, this._delet eButtonClicked.bind(this), this._updateData.bind(this, true)); 44 return new WebInspector.DataGrid(columns, undefined, this._deleteButtonC licked.bind(this), this._updateData.bind(this, true));
45 return dataGrid;
46 }, 45 },
47 46
48 _createEditorToolbar: function() 47 _createEditorToolbar: function()
49 { 48 {
50 var editorToolbar = new WebInspector.Toolbar("data-view-toolbar", this.e lement); 49 var editorToolbar = new WebInspector.Toolbar("data-view-toolbar", this.e lement);
51 50
52 this._pageBackButton = new WebInspector.ToolbarButton(WebInspector.UIStr ing("Show previous page"), "play-backwards-toolbar-item"); 51 this._pageBackButton = new WebInspector.ToolbarButton(WebInspector.UIStr ing("Show previous page"), "play-backwards-toolbar-item");
53 this._pageBackButton.addEventListener("click", this._pageBackButtonClick ed, this); 52 this._pageBackButton.addEventListener("click", this._pageBackButtonClick ed, this);
54 editorToolbar.appendToolbarItem(this._pageBackButton); 53 editorToolbar.appendToolbarItem(this._pageBackButton);
55 54
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }, 153 },
155 154
156 clear: function() 155 clear: function()
157 { 156 {
158 this._dataGrid.rootNode().removeChildren(); 157 this._dataGrid.rootNode().removeChildren();
159 this._entries = []; 158 this._entries = [];
160 }, 159 },
161 160
162 __proto__: WebInspector.SimpleView.prototype 161 __proto__: WebInspector.SimpleView.prototype
163 }; 162 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698