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

Side by Side Diff: Source/devtools/front_end/network/ResourceWebSocketFrameView.js

Issue 422293002: DevTools: NetworkPanel: split networkPanel.css (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months 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 /* 1 /*
2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public 5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details. 12 * Lesser General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Lesser General Public 14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software 15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US A 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US A
17 */ 17 */
18 18
19 /** 19 /**
20 * @constructor 20 * @constructor
21 * @extends {WebInspector.VBox} 21 * @extends {WebInspector.VBox}
22 */ 22 */
23 WebInspector.ResourceWebSocketFrameView = function(resource) 23 WebInspector.ResourceWebSocketFrameView = function(resource)
24 { 24 {
25 WebInspector.VBox.call(this); 25 WebInspector.VBox.call(this);
26 this.element.classList.add("resource-websocket"); 26 this.registerRequiredCSS("webSocketFrameView.css");
27 this.element.classList.add("websocket-frame-view");
27 this.resource = resource; 28 this.resource = resource;
28 this.element.removeChildren(); 29 this.element.removeChildren();
29 30
30 this._dataGrid = new WebInspector.DataGrid([ 31 this._dataGrid = new WebInspector.DataGrid([
31 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig ht: 88, longText: true}, 32 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig ht: 88, longText: true},
32 {id: "length", title: WebInspector.UIString("Length"), sortable: false, alig: WebInspector.DataGrid.Align.Right, weight: 5}, 33 {id: "length", title: WebInspector.UIString("Length"), sortable: false, alig: WebInspector.DataGrid.Align.Right, weight: 5},
33 {id: "time", title: WebInspector.UIString("Time"), weight: 7} 34 {id: "time", title: WebInspector.UIString("Time"), weight: 7}
34 ], undefined, undefined, undefined, this._onContextMenu.bind(this)); 35 ], undefined, undefined, undefined, this._onContextMenu.bind(this));
35 36
36 this.refresh(); 37 this.refresh();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 opcodeMeaning = WebInspector.UIString("Pong Frame"); 89 opcodeMeaning = WebInspector.UIString("Pong Frame");
89 break; 90 break;
90 } 91 }
91 row.data = WebInspector.UIString("%s (Opcode %d%s)", opcodeMeaning, payload.opcode, (payload.mask ? ", mask" : "")); 92 row.data = WebInspector.UIString("%s (Opcode %d%s)", opcodeMeaning, payload.opcode, (payload.mask ? ", mask" : ""));
92 } 93 }
93 94
94 var node = new WebInspector.DataGridNode(row, false); 95 var node = new WebInspector.DataGridNode(row, false);
95 this._dataGrid.rootNode().appendChild(node); 96 this._dataGrid.rootNode().appendChild(node);
96 97
97 if (rowClass) 98 if (rowClass)
98 node.element.classList.add("resource-websocket-row-" + rowClass); 99 node.element.classList.add("websocket-frame-view-row-" + rowClass);
99 }, 100 },
100 101
101 refresh: function() 102 refresh: function()
102 { 103 {
103 this._dataGrid.rootNode().removeChildren(); 104 this._dataGrid.rootNode().removeChildren();
104 var frames = this.resource.frames(); 105 var frames = this.resource.frames();
105 for (var i = frames.length - 1; i >= 0; i--) { 106 for (var i = frames.length - 1; i >= 0; i--) {
106 this.appendFrame(frames[i]); 107 this.appendFrame(frames[i]);
107 } 108 }
108 }, 109 },
(...skipping 16 matching lines...) Expand all
125 /** 126 /**
126 * @param {!Object} row 127 * @param {!Object} row
127 */ 128 */
128 _copyMessage: function(row) 129 _copyMessage: function(row)
129 { 130 {
130 InspectorFrontendHost.copyText(row.data); 131 InspectorFrontendHost.copyText(row.data);
131 }, 132 },
132 133
133 __proto__: WebInspector.VBox.prototype 134 __proto__: WebInspector.VBox.prototype
134 } 135 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/network/RequestHeadersView.js ('k') | Source/devtools/front_end/networkPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698