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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfileHeader.js

Issue 2626313002: DevTools: split ProfilesPanel into multiple files. (Closed)
Patch Set: rebaselined Created 3 years, 11 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @unrestricted
7 */
8 Profiler.ProfileHeader = class extends Common.Object {
9 /**
10 * @param {?SDK.Target} target
11 * @param {!Profiler.ProfileType} profileType
12 * @param {string} title
13 */
14 constructor(target, profileType, title) {
15 super();
16 this._target = target;
17 this._profileType = profileType;
18 this.title = title;
19 this.uid = profileType.incrementProfileUid();
20 this._fromFile = false;
21 }
22
23 /**
24 * @return {?SDK.Target}
25 */
26 target() {
27 return this._target;
28 }
29
30 /**
31 * @return {!Profiler.ProfileType}
32 */
33 profileType() {
34 return this._profileType;
35 }
36
37 /**
38 * @param {?string} subtitle
39 * @param {boolean=} wait
40 */
41 updateStatus(subtitle, wait) {
42 this.dispatchEventToListeners(
43 Profiler.ProfileHeader.Events.UpdateStatus, new Profiler.ProfileHeader.S tatusUpdate(subtitle, wait));
44 }
45
46 /**
47 * Must be implemented by subclasses.
48 * @param {!Profiler.ProfileType.DataDisplayDelegate} dataDisplayDelegate
49 * @return {!Profiler.ProfileSidebarTreeElement}
50 */
51 createSidebarTreeElement(dataDisplayDelegate) {
52 throw new Error('Needs implemented.');
53 }
54
55 /**
56 * @param {!Profiler.ProfileType.DataDisplayDelegate} dataDisplayDelegate
57 * @return {!UI.Widget}
58 */
59 createView(dataDisplayDelegate) {
60 throw new Error('Not implemented.');
61 }
62
63 removeTempFile() {
64 if (this._tempFile)
65 this._tempFile.remove();
66 }
67
68 dispose() {
69 }
70
71 /**
72 * @return {boolean}
73 */
74 canSaveToFile() {
75 return false;
76 }
77
78 saveToFile() {
79 throw new Error('Needs implemented');
80 }
81
82 /**
83 * @param {!File} file
84 */
85 loadFromFile(file) {
86 throw new Error('Needs implemented');
87 }
88
89 /**
90 * @return {boolean}
91 */
92 fromFile() {
93 return this._fromFile;
94 }
95
96 setFromFile() {
97 this._fromFile = true;
98 }
99 };
100
101 /**
102 * @unrestricted
103 */
104 Profiler.ProfileHeader.StatusUpdate = class {
105 /**
106 * @param {?string} subtitle
107 * @param {boolean|undefined} wait
108 */
109 constructor(subtitle, wait) {
110 /** @type {?string} */
111 this.subtitle = subtitle;
112 /** @type {boolean|undefined} */
113 this.wait = wait;
114 }
115 };
116
117 /** @enum {symbol} */
118 Profiler.ProfileHeader.Events = {
119 UpdateStatus: Symbol('UpdateStatus'),
120 ProfileReceived: Symbol('ProfileReceived')
121 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698