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 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
8 */ | 8 */ |
9 WebInspector.PromisePane = function() | 9 WebInspector.PromisePane = function() |
10 { | 10 { |
11 WebInspector.VBox.call(this); | 11 WebInspector.VBox.call(this); |
12 this.registerRequiredCSS("promises/promisePane.css"); | 12 this.registerRequiredCSS("promises/promisePane.css"); |
13 this.element.classList.add("promises"); | 13 this.element.classList.add("promises"); |
14 | 14 |
15 var statusBar = this.element.createChild("div", "panel-status-bar"); | 15 var statusBar = new WebInspector.StatusBar(this.element); |
16 this._recordButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Record Promises"), "record-profile-status-bar-item"); | 16 this._recordButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Record Promises"), "record-profile-status-bar-item"); |
17 this._recordButton.addEventListener("click", this._recordButtonClicked.bind(
this)); | 17 this._recordButton.addEventListener("click", this._recordButtonClicked.bind(
this)); |
18 statusBar.appendChild(this._recordButton.element); | 18 statusBar.appendStatusBarItem(this._recordButton); |
19 var clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Cl
ear"), "clear-status-bar-item"); | 19 var clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Cl
ear"), "clear-status-bar-item"); |
20 clearButton.addEventListener("click", this._clearButtonClicked.bind(this)); | 20 clearButton.addEventListener("click", this._clearButtonClicked.bind(this)); |
21 statusBar.appendChild(clearButton.element); | 21 statusBar.appendStatusBarItem(clearButton); |
22 this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString
("Refresh"), "refresh-storage-status-bar-item"); | 22 this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString
("Refresh"), "refresh-storage-status-bar-item"); |
23 this._refreshButton.addEventListener("click", this._refreshButtonClicked.bin
d(this)); | 23 this._refreshButton.addEventListener("click", this._refreshButtonClicked.bin
d(this)); |
24 this._refreshButton.setEnabled(false); | 24 this._refreshButton.setEnabled(false); |
25 statusBar.appendChild(this._refreshButton.element); | 25 statusBar.appendStatusBarItem(this._refreshButton); |
26 this._liveCheckbox = new WebInspector.StatusBarCheckbox(WebInspector.UIStrin
g("Live")); | 26 this._liveCheckbox = new WebInspector.StatusBarCheckbox(WebInspector.UIStrin
g("Live")); |
27 this._liveCheckbox.element.title = WebInspector.UIString("Live Recording"); | 27 this._liveCheckbox.element.title = WebInspector.UIString("Live Recording"); |
28 this._liveCheckbox.inputElement.disabled = true; | 28 this._liveCheckbox.inputElement.disabled = true; |
29 statusBar.appendChild(this._liveCheckbox.element); | 29 statusBar.appendStatusBarItem(this._liveCheckbox); |
30 | 30 |
31 this._dataGridContainer = new WebInspector.VBox(); | 31 this._dataGridContainer = new WebInspector.VBox(); |
32 this._dataGridContainer.show(this.element); | 32 this._dataGridContainer.show(this.element); |
33 var columns = [ | 33 var columns = [ |
34 { id: "location", title: WebInspector.UIString("Location"), disclosure:
true }, | 34 { id: "location", title: WebInspector.UIString("Location"), disclosure:
true }, |
35 { id: "status", title: WebInspector.UIString("Status") }, | 35 { id: "status", title: WebInspector.UIString("Status") }, |
36 { id: "tts", title: WebInspector.UIString("Time to settle") } | 36 { id: "tts", title: WebInspector.UIString("Time to settle") } |
37 ]; | 37 ]; |
38 this._dataGrid = new WebInspector.DataGrid(columns, undefined, undefined, un
defined, this._onContextMenu.bind(this)); | 38 this._dataGrid = new WebInspector.DataGrid(columns, undefined, undefined, un
defined, this._onContextMenu.bind(this)); |
39 this._dataGrid.show(this._dataGridContainer.element); | 39 this._dataGrid.show(this._dataGridContainer.element); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 undefined, | 191 undefined, |
192 undefined, | 192 undefined, |
193 [promise]); | 193 [promise]); |
194 this._target.consoleModel.addMessage(message); | 194 this._target.consoleModel.addMessage(message); |
195 WebInspector.console.show(); | 195 WebInspector.console.show(); |
196 } | 196 } |
197 }, | 197 }, |
198 | 198 |
199 __proto__: WebInspector.VBox.prototype | 199 __proto__: WebInspector.VBox.prototype |
200 } | 200 } |
OLD | NEW |