OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @implements {WebInspector.Searchable} | 7 * @implements {WebInspector.Searchable} |
8 * @extends {WebInspector.SimpleView} | 8 * @extends {WebInspector.SimpleView} |
9 */ | 9 */ |
10 WebInspector.ProfileView = function() | 10 WebInspector.ProfileView = function() |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 var options = new Map(viewTypes.map(type => [type, this.viewSelectComboB
ox.createOption(optionNames.get(type), "", type)])); | 90 var options = new Map(viewTypes.map(type => [type, this.viewSelectComboB
ox.createOption(optionNames.get(type), "", type)])); |
91 var optionName = this._viewType.get() || viewTypes[0]; | 91 var optionName = this._viewType.get() || viewTypes[0]; |
92 var option = options.get(optionName) || options.get(viewTypes[0]); | 92 var option = options.get(optionName) || options.get(viewTypes[0]); |
93 this.viewSelectComboBox.select(option); | 93 this.viewSelectComboBox.select(option); |
94 | 94 |
95 this._changeView(); | 95 this._changeView(); |
96 if (this._flameChart) | 96 if (this._flameChart) |
97 this._flameChart.update(); | 97 this._flameChart.update(); |
98 }, | 98 }, |
99 | 99 |
| 100 /** |
| 101 * @override |
| 102 */ |
100 focus: function() | 103 focus: function() |
101 { | 104 { |
102 if (this._flameChart) | 105 if (this._flameChart) |
103 this._flameChart.focus(); | 106 this._flameChart.focus(); |
104 else | 107 else |
105 WebInspector.Widget.prototype.focus.call(this); | 108 WebInspector.SimpleView.prototype.focus.call(this); |
106 }, | 109 }, |
107 | 110 |
108 /** | 111 /** |
109 * @param {string} columnId | 112 * @param {string} columnId |
110 * @return {string} | 113 * @return {string} |
111 */ | 114 */ |
112 columnHeader: function(columnId) | 115 columnHeader: function(columnId) |
113 { | 116 { |
114 throw "Not implemented"; | 117 throw "Not implemented"; |
115 }, | 118 }, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 503 |
501 /** | 504 /** |
502 * @override | 505 * @override |
503 * @return {boolean} | 506 * @return {boolean} |
504 */ | 507 */ |
505 canSaveToFile: function() | 508 canSaveToFile: function() |
506 { | 509 { |
507 return !this.fromFile() && this._protocolProfile; | 510 return !this.fromFile() && this._protocolProfile; |
508 }, | 511 }, |
509 | 512 |
| 513 /** |
| 514 * @override |
| 515 */ |
510 saveToFile: function() | 516 saveToFile: function() |
511 { | 517 { |
512 var fileOutputStream = new WebInspector.FileOutputStream(); | 518 var fileOutputStream = new WebInspector.FileOutputStream(); |
513 | 519 |
514 /** | 520 /** |
515 * @param {boolean} accepted | 521 * @param {boolean} accepted |
516 * @this {WebInspector.WritableProfileHeader} | 522 * @this {WebInspector.WritableProfileHeader} |
517 */ | 523 */ |
518 function onOpenForSave(accepted) | 524 function onOpenForSave(accepted) |
519 { | 525 { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 _notifyTempFileReady: function() | 614 _notifyTempFileReady: function() |
609 { | 615 { |
610 if (this._onTempFileReady) { | 616 if (this._onTempFileReady) { |
611 this._onTempFileReady(); | 617 this._onTempFileReady(); |
612 this._onTempFileReady = null; | 618 this._onTempFileReady = null; |
613 } | 619 } |
614 }, | 620 }, |
615 | 621 |
616 __proto__: WebInspector.ProfileHeader.prototype | 622 __proto__: WebInspector.ProfileHeader.prototype |
617 }; | 623 }; |
OLD | NEW |