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

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

Issue 2335983002: [DevTools] Remove SidebarTreeElement from ProfilesPanel. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 { 929 {
930 WebInspector.context.setFlavor(WebInspector.ProfilesPanel, null); 930 WebInspector.context.setFlavor(WebInspector.ProfilesPanel, null);
931 }, 931 },
932 932
933 __proto__: WebInspector.PanelWithSidebar.prototype 933 __proto__: WebInspector.PanelWithSidebar.prototype
934 } 934 }
935 935
936 936
937 /** 937 /**
938 * @constructor 938 * @constructor
939 * @extends {WebInspector.SidebarSectionTreeElement} 939 * @extends {TreeElement}
940 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate 940 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
941 * @param {!WebInspector.ProfileType} profileType 941 * @param {!WebInspector.ProfileType} profileType
942 */ 942 */
943 WebInspector.ProfileTypeSidebarSection = function(dataDisplayDelegate, profileTy pe) 943 WebInspector.ProfileTypeSidebarSection = function(dataDisplayDelegate, profileTy pe)
944 { 944 {
945 WebInspector.SidebarSectionTreeElement.call(this, profileType.treeItemTitle) ; 945 TreeElement.call(this, profileType.treeItemTitle.escapeHTML(), true);
946 this._dataDisplayDelegate = dataDisplayDelegate; 946 this._dataDisplayDelegate = dataDisplayDelegate;
947 /** @type {!Array<!WebInspector.ProfileSidebarTreeElement>} */
947 this._profileTreeElements = []; 948 this._profileTreeElements = [];
949 /** @type {!Object<string, !WebInspector.ProfileTypeSidebarSection.ProfileGr oup>} */
948 this._profileGroups = {}; 950 this._profileGroups = {};
951 this.expand();
949 this.hidden = true; 952 this.hidden = true;
950 } 953 }
951 954
952 /** 955 /**
953 * @constructor 956 * @constructor
954 */ 957 */
955 WebInspector.ProfileTypeSidebarSection.ProfileGroup = function() 958 WebInspector.ProfileTypeSidebarSection.ProfileGroup = function()
956 { 959 {
960 /** @type {!Array<!WebInspector.ProfileSidebarTreeElement>} */
957 this.profileSidebarTreeElements = []; 961 this.profileSidebarTreeElements = [];
962 /** @type {?WebInspector.ProfileGroupSidebarTreeElement} */
958 this.sidebarTreeElement = null; 963 this.sidebarTreeElement = null;
959 } 964 }
960 965
961 WebInspector.ProfileTypeSidebarSection.prototype = { 966 WebInspector.ProfileTypeSidebarSection.prototype = {
962 /** 967 /**
963 * @param {!WebInspector.ProfileHeader} profile 968 * @param {!WebInspector.ProfileHeader} profile
964 */ 969 */
965 addProfileHeader: function(profile) 970 addProfileHeader: function(profile)
966 { 971 {
967 this.hidden = false; 972 this.hidden = false;
(...skipping 21 matching lines...) Expand all
989 var index = this.children().indexOf(firstProfileTreeElement); 994 var index = this.children().indexOf(firstProfileTreeElement);
990 this.insertChild(group.sidebarTreeElement, index); 995 this.insertChild(group.sidebarTreeElement, index);
991 996
992 // Move the first profile to the group. 997 // Move the first profile to the group.
993 var selected = firstProfileTreeElement.selected; 998 var selected = firstProfileTreeElement.selected;
994 this.removeChild(firstProfileTreeElement); 999 this.removeChild(firstProfileTreeElement);
995 group.sidebarTreeElement.appendChild(firstProfileTreeElement); 1000 group.sidebarTreeElement.appendChild(firstProfileTreeElement);
996 if (selected) 1001 if (selected)
997 firstProfileTreeElement.revealAndSelect(); 1002 firstProfileTreeElement.revealAndSelect();
998 1003
999 firstProfileTreeElement.small = true; 1004 firstProfileTreeElement.setSmall(true);
1000 firstProfileTreeElement.mainTitle = WebInspector.UIString("Run % d", 1); 1005 firstProfileTreeElement.setMainTitle(WebInspector.UIString("Run %d", 1));
1001 1006
1002 this.treeOutline.element.classList.add("some-expandable"); 1007 this.treeOutline.element.classList.add("some-expandable");
1003 } 1008 }
1004 1009
1005 if (groupSize >= 2) { 1010 if (groupSize >= 2) {
1006 sidebarParent = group.sidebarTreeElement; 1011 sidebarParent = group.sidebarTreeElement;
1007 profileTreeElement.small = true; 1012 profileTreeElement.setSmall(true);
1008 profileTreeElement.mainTitle = WebInspector.UIString("Run %d", g roupSize); 1013 profileTreeElement.setMainTitle(WebInspector.UIString("Run %d", groupSize));
1009 } 1014 }
1010 } 1015 }
1011 1016
1012 sidebarParent.appendChild(profileTreeElement); 1017 sidebarParent.appendChild(profileTreeElement);
1013 }, 1018 },
1014 1019
1015 /** 1020 /**
1016 * @param {!WebInspector.ProfileHeader} profile 1021 * @param {!WebInspector.ProfileHeader} profile
1017 * @return {boolean} 1022 * @return {boolean}
1018 */ 1023 */
1019 removeProfileHeader: function(profile) 1024 removeProfileHeader: function(profile)
1020 { 1025 {
1021 var index = this._sidebarElementIndex(profile); 1026 var index = this._sidebarElementIndex(profile);
1022 if (index === -1) 1027 if (index === -1)
1023 return false; 1028 return false;
1024 var profileTreeElement = this._profileTreeElements[index]; 1029 var profileTreeElement = this._profileTreeElements[index];
1025 this._profileTreeElements.splice(index, 1); 1030 this._profileTreeElements.splice(index, 1);
1026 1031
1027 var sidebarParent = this; 1032 var sidebarParent = this;
1028 var group = this._profileGroups[profile.title]; 1033 var group = this._profileGroups[profile.title];
1029 if (group) { 1034 if (group) {
1030 var groupElements = group.profileSidebarTreeElements; 1035 var groupElements = group.profileSidebarTreeElements;
1031 groupElements.splice(groupElements.indexOf(profileTreeElement), 1); 1036 groupElements.splice(groupElements.indexOf(profileTreeElement), 1);
1032 if (groupElements.length === 1) { 1037 if (groupElements.length === 1) {
1033 // Move the last profile out of its group and remove the group. 1038 // Move the last profile out of its group and remove the group.
1034 var pos = sidebarParent.children().indexOf(group.sidebarTreeElem ent); 1039 var pos = sidebarParent.children().indexOf(/** @type {!WebInspec tor.ProfileGroupSidebarTreeElement} */ (group.sidebarTreeElement));
1035 group.sidebarTreeElement.removeChild(groupElements[0]); 1040 group.sidebarTreeElement.removeChild(groupElements[0]);
1036 this.insertChild(groupElements[0], pos); 1041 this.insertChild(groupElements[0], pos);
1037 groupElements[0].small = false; 1042 groupElements[0].setSmall(false);
1038 groupElements[0].mainTitle = group.sidebarTreeElement.title; 1043 groupElements[0].setMainTitle(profile.title);
1039 this.removeChild(group.sidebarTreeElement); 1044 this.removeChild(group.sidebarTreeElement);
1040 } 1045 }
1041 if (groupElements.length !== 0) 1046 if (groupElements.length !== 0)
1042 sidebarParent = group.sidebarTreeElement; 1047 sidebarParent = group.sidebarTreeElement;
1043 } 1048 }
1044 sidebarParent.removeChild(profileTreeElement); 1049 sidebarParent.removeChild(profileTreeElement);
1045 profileTreeElement.dispose(); 1050 profileTreeElement.dispose();
1046 1051
1047 if (this.childCount()) 1052 if (this.childCount())
1048 return false; 1053 return false;
(...skipping 18 matching lines...) Expand all
1067 _sidebarElementIndex: function(profile) 1072 _sidebarElementIndex: function(profile)
1068 { 1073 {
1069 var elements = this._profileTreeElements; 1074 var elements = this._profileTreeElements;
1070 for (var i = 0; i < elements.length; i++) { 1075 for (var i = 0; i < elements.length; i++) {
1071 if (elements[i].profile === profile) 1076 if (elements[i].profile === profile)
1072 return i; 1077 return i;
1073 } 1078 }
1074 return -1; 1079 return -1;
1075 }, 1080 },
1076 1081
1077 __proto__: WebInspector.SidebarSectionTreeElement.prototype 1082 /**
1083 * @override
1084 */
1085 onattach: function()
1086 {
1087 this.listItemElement.classList.add("sidebar-tree-section");
1088 },
1089
1090 __proto__: TreeElement.prototype
1078 } 1091 }
1079 1092
1080 1093
1081 /** 1094 /**
1082 * @constructor 1095 * @constructor
1083 * @implements {WebInspector.ContextMenu.Provider} 1096 * @implements {WebInspector.ContextMenu.Provider}
1084 */ 1097 */
1085 WebInspector.ProfilesPanel.ContextMenuProvider = function() 1098 WebInspector.ProfilesPanel.ContextMenuProvider = function()
1086 { 1099 {
1087 } 1100 }
1088 1101
1089 WebInspector.ProfilesPanel.ContextMenuProvider.prototype = { 1102 WebInspector.ProfilesPanel.ContextMenuProvider.prototype = {
1090 /** 1103 /**
1091 * @override 1104 * @override
1092 * @param {!Event} event 1105 * @param {!Event} event
1093 * @param {!WebInspector.ContextMenu} contextMenu 1106 * @param {!WebInspector.ContextMenu} contextMenu
1094 * @param {!Object} target 1107 * @param {!Object} target
1095 */ 1108 */
1096 appendApplicableItems: function(event, contextMenu, target) 1109 appendApplicableItems: function(event, contextMenu, target)
1097 { 1110 {
1098 WebInspector.ProfilesPanel._instance().appendApplicableItems(event, cont extMenu, target); 1111 WebInspector.ProfilesPanel._instance().appendApplicableItems(event, cont extMenu, target);
1099 } 1112 }
1100 } 1113 }
1101 1114
1102 /** 1115 /**
1103 * @constructor 1116 * @constructor
1104 * @extends {WebInspector.SidebarTreeElement} 1117 * @extends {TreeElement}
1105 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate 1118 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
1106 * @param {!WebInspector.ProfileHeader} profile 1119 * @param {!WebInspector.ProfileHeader} profile
1107 * @param {string} className 1120 * @param {string} className
1108 */ 1121 */
1109 WebInspector.ProfileSidebarTreeElement = function(dataDisplayDelegate, profile, className) 1122 WebInspector.ProfileSidebarTreeElement = function(dataDisplayDelegate, profile, className)
1110 { 1123 {
1124 TreeElement.call(this, "", false);
1125 this._iconElement = createElementWithClass("div", "icon");
1126 this._titlesElement = createElementWithClass("div", "titles no-subtitle");
1127 this._titleContainer = this._titlesElement.createChild("span", "title-contai ner");
1128 this._titleElement = this._titleContainer.createChild("span", "title");
1129 this._subtitleElement = this._titlesElement.createChild("span", "subtitle");
1130
1131 this._titleElement.textContent = profile.title;
1132 this._className = className;
1133 this._small = false;
1111 this._dataDisplayDelegate = dataDisplayDelegate; 1134 this._dataDisplayDelegate = dataDisplayDelegate;
1112 this.profile = profile; 1135 this.profile = profile;
1113 WebInspector.SidebarTreeElement.call(this, className, profile.title);
1114 this.refreshTitles();
1115 profile.addEventListener(WebInspector.ProfileHeader.Events.UpdateStatus, thi s._updateStatus, this); 1136 profile.addEventListener(WebInspector.ProfileHeader.Events.UpdateStatus, thi s._updateStatus, this);
1116 if (profile.canSaveToFile()) 1137 if (profile.canSaveToFile())
1117 this._createSaveLink(); 1138 this._createSaveLink();
1118 else 1139 else
1119 profile.addEventListener(WebInspector.ProfileHeader.Events.ProfileReceiv ed, this._onProfileReceived, this); 1140 profile.addEventListener(WebInspector.ProfileHeader.Events.ProfileReceiv ed, this._onProfileReceived, this);
1120 } 1141 }
1121 1142
1122 WebInspector.ProfileSidebarTreeElement.prototype = { 1143 WebInspector.ProfileSidebarTreeElement.prototype = {
1123 _createSaveLink: function() 1144 _createSaveLink: function()
1124 { 1145 {
1125 this._saveLinkElement = this.titleContainer.createChild("span", "save-li nk"); 1146 this._saveLinkElement = this._titleContainer.createChild("span", "save-l ink");
1126 this._saveLinkElement.textContent = WebInspector.UIString("Save"); 1147 this._saveLinkElement.textContent = WebInspector.UIString("Save");
1127 this._saveLinkElement.addEventListener("click", this._saveProfile.bind(t his), false); 1148 this._saveLinkElement.addEventListener("click", this._saveProfile.bind(t his), false);
1128 }, 1149 },
1129 1150
1130 _onProfileReceived: function(event) 1151 _onProfileReceived: function(event)
1131 { 1152 {
1132 this._createSaveLink(); 1153 this._createSaveLink();
1133 }, 1154 },
1134 1155
1135 /** 1156 /**
1136 * @param {!WebInspector.Event} event 1157 * @param {!WebInspector.Event} event
1137 */ 1158 */
1138 _updateStatus: function(event) 1159 _updateStatus: function(event)
1139 { 1160 {
1140 var statusUpdate = event.data; 1161 var statusUpdate = event.data;
1141 if (statusUpdate.subtitle !== null) 1162 if (statusUpdate.subtitle !== null) {
1142 this.subtitle = statusUpdate.subtitle; 1163 if (statusUpdate.subtitle) {
1143 if (typeof statusUpdate.wait === "boolean") 1164 this._subtitleElement.textContent = statusUpdate.subtitle;
1144 this.wait = statusUpdate.wait; 1165 this._titlesElement.classList.remove("no-subtitle");
alph 2016/09/13 00:59:07 nit: this._subtitleElement.textContent = statusUpd
dgozman 2016/09/14 18:34:10 Done.
1145 this.refreshTitles(); 1166 } else {
1167 this._subtitleElement.textContent = "";
1168 this._titlesElement.classList.add("no-subtitle");
1169 }
1170 }
1171 if (typeof statusUpdate.wait === "boolean" && this.listItemElement)
1172 this.listItemElement.classList.toggle("wait", statusUpdate.wait);
1146 }, 1173 },
1147 1174
1148 dispose: function() 1175 dispose: function()
1149 { 1176 {
1150 this.profile.removeEventListener(WebInspector.ProfileHeader.Events.Updat eStatus, this._updateStatus, this); 1177 this.profile.removeEventListener(WebInspector.ProfileHeader.Events.Updat eStatus, this._updateStatus, this);
1151 this.profile.removeEventListener(WebInspector.ProfileHeader.Events.Profi leReceived, this._onProfileReceived, this); 1178 this.profile.removeEventListener(WebInspector.ProfileHeader.Events.Profi leReceived, this._onProfileReceived, this);
1152 }, 1179 },
1153 1180
1154 /** 1181 /**
1155 * @override 1182 * @override
1156 * @return {boolean} 1183 * @return {boolean}
1157 */ 1184 */
1158 onselect: function() 1185 onselect: function()
1159 { 1186 {
1160 this._dataDisplayDelegate.showProfile(this.profile); 1187 this._dataDisplayDelegate.showProfile(this.profile);
1161 return true; 1188 return true;
1162 }, 1189 },
1163 1190
1164 /** 1191 /**
1165 * @override 1192 * @override
1166 * @return {boolean} 1193 * @return {boolean}
1167 */ 1194 */
1168 ondelete: function() 1195 ondelete: function()
1169 { 1196 {
1170 this.profile.profileType().removeProfile(this.profile); 1197 this.profile.profileType().removeProfile(this.profile);
1171 return true; 1198 return true;
1172 }, 1199 },
1173 1200
1174 /** 1201 /**
1202 * @override
1203 */
1204 onattach: function()
1205 {
1206 this.listItemElement.classList.add("sidebar-tree-item");
1207 if (this._className)
1208 this.listItemElement.classList.add(this._className);
1209 if (this._small)
1210 this.listItemElement.classList.add("small");
1211 this.listItemElement.appendChildren(this._iconElement, this._titlesEleme nt);
1212 },
1213
1214 /**
1175 * @param {!Event} event 1215 * @param {!Event} event
1176 * @param {!WebInspector.ProfilesPanel} panel 1216 * @param {!WebInspector.ProfilesPanel} panel
1177 */ 1217 */
1178 handleContextMenuEvent: function(event, panel) 1218 handleContextMenuEvent: function(event, panel)
1179 { 1219 {
1180 var profile = this.profile; 1220 var profile = this.profile;
1181 var contextMenu = new WebInspector.ContextMenu(event); 1221 var contextMenu = new WebInspector.ContextMenu(event);
1182 // FIXME: use context menu provider 1222 // FIXME: use context menu provider
1183 contextMenu.appendItem(WebInspector.UIString("Load\u2026"), panel._fileS electorElement.click.bind(panel._fileSelectorElement)); 1223 contextMenu.appendItem(WebInspector.UIString("Load\u2026"), panel._fileS electorElement.click.bind(panel._fileSelectorElement));
1184 if (profile.canSaveToFile()) 1224 if (profile.canSaveToFile())
1185 contextMenu.appendItem(WebInspector.UIString("Save\u2026"), profile. saveToFile.bind(profile)); 1225 contextMenu.appendItem(WebInspector.UIString("Save\u2026"), profile. saveToFile.bind(profile));
1186 contextMenu.appendItem(WebInspector.UIString("Delete"), this.ondelete.bi nd(this)); 1226 contextMenu.appendItem(WebInspector.UIString("Delete"), this.ondelete.bi nd(this));
1187 contextMenu.show(); 1227 contextMenu.show();
1188 }, 1228 },
1189 1229
1190 _saveProfile: function(event) 1230 _saveProfile: function(event)
1191 { 1231 {
1192 this.profile.saveToFile(); 1232 this.profile.saveToFile();
1193 }, 1233 },
1194 1234
1195 __proto__: WebInspector.SidebarTreeElement.prototype 1235 /**
1236 * @param {boolean} small
1237 */
1238 setSmall: function(small)
1239 {
1240 this._small = small;
1241 if (this.listItemElement)
1242 this.listItemElement.classList.toggle("small", this._small);
1243 },
1244
1245 /**
1246 * @param {string} title
1247 */
1248 setMainTitle: function(title)
1249 {
1250 this._titleElement.textContent = title;
1251 },
1252
1253 __proto__: TreeElement.prototype
1196 } 1254 }
1197 1255
1198 /** 1256 /**
1199 * @constructor 1257 * @constructor
1200 * @extends {WebInspector.SidebarTreeElement} 1258 * @extends {TreeElement}
1201 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate 1259 * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
1202 * @param {string} title 1260 * @param {string} title
1203 * @param {string=} subtitle
1204 */ 1261 */
1205 WebInspector.ProfileGroupSidebarTreeElement = function(dataDisplayDelegate, titl e, subtitle) 1262 WebInspector.ProfileGroupSidebarTreeElement = function(dataDisplayDelegate, titl e)
1206 { 1263 {
1207 WebInspector.SidebarTreeElement.call(this, "profile-group-sidebar-tree-item" , title, subtitle, true); 1264 TreeElement.call(this, "", true);
1265 this.selectable = false;
1208 this._dataDisplayDelegate = dataDisplayDelegate; 1266 this._dataDisplayDelegate = dataDisplayDelegate;
1267 this._title = title;
1209 } 1268 }
1210 1269
1211 WebInspector.ProfileGroupSidebarTreeElement.prototype = { 1270 WebInspector.ProfileGroupSidebarTreeElement.prototype = {
1212 /** 1271 /**
1213 * @override 1272 * @override
1214 * @return {boolean} 1273 * @return {boolean}
1215 */ 1274 */
1216 onselect: function() 1275 onselect: function()
1217 { 1276 {
1218 var hasChildren = this.childCount() > 0; 1277 var hasChildren = this.childCount() > 0;
1219 if (hasChildren) 1278 if (hasChildren)
1220 this._dataDisplayDelegate.showProfile(this.lastChild().profile); 1279 this._dataDisplayDelegate.showProfile(this.lastChild().profile);
1221 return hasChildren; 1280 return hasChildren;
1222 }, 1281 },
1223 1282
1224 __proto__: WebInspector.SidebarTreeElement.prototype 1283 /**
1284 * @override
1285 */
1286 onattach: function()
1287 {
1288 this.listItemElement.classList.add("sidebar-tree-item", "profile-group-s idebar-tree-item");
1289 this._disclosureButton = this.listItemElement.createChild("button", "dis closure-button");
1290 this.listItemElement.createChild("div", "icon");
1291 this.listItemElement.createChild("div", "titles no-subtitle").createChil d("span", "title-container").createChild("span", "title").textContent = this._ti tle;
1292 },
1293
1294 /**
1295 * @override
1296 * @return {boolean}
alph 2016/09/13 00:59:07 @param
dgozman 2016/09/14 18:34:10 Done.
1297 */
1298 isEventWithinDisclosureTriangle: function(event)
1299 {
1300 return event.target === this._disclosureButton;
1301 },
1302
1303 __proto__: TreeElement.prototype
1225 } 1304 }
1226 1305
1227 /** 1306 /**
1228 * @constructor 1307 * @constructor
1229 * @extends {WebInspector.SidebarTreeElement} 1308 * @extends {TreeElement}
1230 * @param {!WebInspector.ProfilesPanel} panel 1309 * @param {!WebInspector.ProfilesPanel} panel
1231 */ 1310 */
1232 WebInspector.ProfilesSidebarTreeElement = function(panel) 1311 WebInspector.ProfilesSidebarTreeElement = function(panel)
1233 { 1312 {
1313 TreeElement.call(this, "", false);
1314 this.selectable = true;
1234 this._panel = panel; 1315 this._panel = panel;
1235 this.small = false;
1236
1237 WebInspector.SidebarTreeElement.call(this, "profile-launcher-view-tree-item" , WebInspector.UIString("Profiles"));
1238 } 1316 }
1239 1317
1240 WebInspector.ProfilesSidebarTreeElement.prototype = { 1318 WebInspector.ProfilesSidebarTreeElement.prototype = {
1241 /** 1319 /**
1242 * @override 1320 * @override
1243 * @return {boolean} 1321 * @return {boolean}
1244 */ 1322 */
1245 onselect: function() 1323 onselect: function()
1246 { 1324 {
1247 this._panel._showLauncherView(); 1325 this._panel._showLauncherView();
1248 return true; 1326 return true;
1249 }, 1327 },
1250 1328
1251 get selectable() 1329 /**
1330 * @override
1331 */
1332 onattach: function()
1252 { 1333 {
1253 return true; 1334 this.listItemElement.classList.add("sidebar-tree-item", "profile-launche r-view-tree-item");
1335 this.listItemElement.createChild("div", "icon");
1336 this.listItemElement.createChild("div", "titles no-subtitle").createChil d("span", "title-container").createChild("span", "title").textContent = WebInspe ctor.UIString("Profiles");
1254 }, 1337 },
1255 1338
1256 __proto__: WebInspector.SidebarTreeElement.prototype 1339 __proto__: TreeElement.prototype
1257 } 1340 }
1258 1341
1259 WebInspector.ProfilesPanel.show = function() 1342 WebInspector.ProfilesPanel.show = function()
1260 { 1343 {
1261 WebInspector.inspectorView.setCurrentPanel(WebInspector.ProfilesPanel._insta nce()); 1344 WebInspector.inspectorView.setCurrentPanel(WebInspector.ProfilesPanel._insta nce());
1262 } 1345 }
1263 1346
1264 /** 1347 /**
1265 * @return {!WebInspector.ProfilesPanel} 1348 * @return {!WebInspector.ProfilesPanel}
1266 */ 1349 */
(...skipping 18 matching lines...) Expand all
1285 * @return {boolean} 1368 * @return {boolean}
1286 */ 1369 */
1287 handleAction: function(context, actionId) 1370 handleAction: function(context, actionId)
1288 { 1371 {
1289 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel); 1372 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel);
1290 console.assert(panel && panel instanceof WebInspector.ProfilesPanel); 1373 console.assert(panel && panel instanceof WebInspector.ProfilesPanel);
1291 panel.toggleRecord(); 1374 panel.toggleRecord();
1292 return true; 1375 return true;
1293 } 1376 }
1294 } 1377 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698