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 * @implements {UI.Searchable} | 5 * @implements {UI.Searchable} |
6 * @unrestricted | 6 * @unrestricted |
7 */ | 7 */ |
8 Profiler.ProfileView = class extends UI.SimpleView { | 8 Profiler.ProfileView = class extends UI.SimpleView { |
9 constructor() { | 9 constructor() { |
10 super(Common.UIString('Profile')); | 10 super(Common.UIString('Profile')); |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 * @unrestricted | 394 * @unrestricted |
395 */ | 395 */ |
396 Profiler.WritableProfileHeader = class extends Profiler.ProfileHeader { | 396 Profiler.WritableProfileHeader = class extends Profiler.ProfileHeader { |
397 /** | 397 /** |
398 * @param {?SDK.Target} target | 398 * @param {?SDK.Target} target |
399 * @param {!Profiler.ProfileType} type | 399 * @param {!Profiler.ProfileType} type |
400 * @param {string=} title | 400 * @param {string=} title |
401 */ | 401 */ |
402 constructor(target, type, title) { | 402 constructor(target, type, title) { |
403 super(target, type, title || Common.UIString('Profile %d', type.nextProfileU
id())); | 403 super(target, type, title || Common.UIString('Profile %d', type.nextProfileU
id())); |
404 this._debuggerModel = SDK.DebuggerModel.fromTarget(target); | 404 this._debuggerModel = target && target.model(SDK.DebuggerModel); |
405 this._tempFile = null; | 405 this._tempFile = null; |
406 } | 406 } |
407 | 407 |
408 /** | 408 /** |
409 * @override | 409 * @override |
410 */ | 410 */ |
411 onTransferStarted() { | 411 onTransferStarted() { |
412 this._jsonifiedProfile = ''; | 412 this._jsonifiedProfile = ''; |
413 this.updateStatus(Common.UIString('Loading\u2026 %s', Number.bytesToString(t
his._jsonifiedProfile.length)), true); | 413 this.updateStatus(Common.UIString('Loading\u2026 %s', Number.bytesToString(t
his._jsonifiedProfile.length)), true); |
414 } | 414 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 tempFile.write([serializedData], didWriteToTempFile.bind(this)); | 586 tempFile.write([serializedData], didWriteToTempFile.bind(this)); |
587 } | 587 } |
588 | 588 |
589 _notifyTempFileReady() { | 589 _notifyTempFileReady() { |
590 if (this._onTempFileReady) { | 590 if (this._onTempFileReady) { |
591 this._onTempFileReady(); | 591 this._onTempFileReady(); |
592 this._onTempFileReady = null; | 592 this._onTempFileReady = null; |
593 } | 593 } |
594 } | 594 } |
595 }; | 595 }; |
OLD | NEW |