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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js

Issue 2714923002: Revert of DevTools: Add icons to performance pane tabs. (Closed)
Patch Set: Created 3 years, 10 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
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 this._stackView = new UI.StackView(false); 111 this._stackView = new UI.StackView(false);
112 this._stackView.element.classList.add('timeline-view-stack'); 112 this._stackView.element.classList.add('timeline-view-stack');
113 113
114 if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) { 114 if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
115 const viewMode = Timeline.TimelinePanel.ViewMode; 115 const viewMode = Timeline.TimelinePanel.ViewMode;
116 this._tabbedPane = new UI.TabbedPane(); 116 this._tabbedPane = new UI.TabbedPane();
117 this._tabbedPane.appendTab(viewMode.FlameChart, Common.UIString('Flame Cha rt'), new UI.VBox()); 117 this._tabbedPane.appendTab(viewMode.FlameChart, Common.UIString('Flame Cha rt'), new UI.VBox());
118 this._tabbedPane.appendTab(viewMode.BottomUp, Common.UIString('Bottom-Up') , new UI.VBox()); 118 this._tabbedPane.appendTab(viewMode.BottomUp, Common.UIString('Bottom-Up') , new UI.VBox());
119 this._tabbedPane.appendTab(viewMode.CallTree, Common.UIString('Call Tree') , new UI.VBox()); 119 this._tabbedPane.appendTab(viewMode.CallTree, Common.UIString('Call Tree') , new UI.VBox());
120 this._tabbedPane.appendTab(viewMode.EventLog, Common.UIString('Event Log') , new UI.VBox()); 120 this._tabbedPane.appendTab(viewMode.EventLog, Common.UIString('Event Log') , new UI.VBox());
121 this._tabbedPane.setTabIcon(viewMode.FlameChart, UI.Icon.create('largeicon -perf-flamechart'));
122 this._tabbedPane.setTabIcon(viewMode.BottomUp, UI.Icon.create('largeicon-p erf-bottom-up-tree'));
123 this._tabbedPane.setTabIcon(viewMode.CallTree, UI.Icon.create('largeicon-p erf-call-tree'));
124 this._tabbedPane.setTabIcon(viewMode.EventLog, UI.Icon.create('largeicon-p erf-event-list'));
125 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ onMainViewChanged.bind(this)); 121 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ onMainViewChanged.bind(this));
126 this._tabbedPane.selectTab(this._viewModeSetting.get()); 122 this._tabbedPane.selectTab(this._viewModeSetting.get());
127 } else { 123 } else {
128 // Create top level properties splitter. 124 // Create top level properties splitter.
129 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState', 400); 125 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState', 400);
130 this._detailsSplitWidget.element.classList.add('timeline-details-split'); 126 this._detailsSplitWidget.element.classList.add('timeline-details-split');
131 this._detailsView = new Timeline.TimelineDetailsView(this._filters, this); 127 this._detailsView = new Timeline.TimelineDetailsView(this._filters, this);
132 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ; 128 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ;
133 this._detailsSplitWidget.setSidebarWidget(this._detailsView); 129 this._detailsSplitWidget.setSidebarWidget(this._detailsView);
134 this._detailsSplitWidget.setMainWidget(this._stackView); 130 this._detailsSplitWidget.setMainWidget(this._stackView);
135 this._detailsSplitWidget.hideSidebar(); 131 this._detailsSplitWidget.hideSidebar();
136 this._detailsSplitWidget.show(this._timelinePane.element); 132 this._detailsSplitWidget.show(this._timelinePane.element);
137 } 133 }
138 134
139 this._onModeChanged(); 135 this._onModeChanged();
140 this._populateToolbar(); 136 this._populateToolbar();
141 this._showLandingPage(); 137 this._showLandingPage();
142 138
143 Extensions.extensionServer.addEventListener( 139 Extensions.extensionServer.addEventListener(
144 Extensions.ExtensionServer.Events.TraceProviderAdded, this._appendExtens ionsToToolbar, this); 140 Extensions.ExtensionServer.Events.TraceProviderAdded, this._appendExtens ionsToToolbar, this);
145 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan ged, this._onSuspendStateChanged, this); 141 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan ged, this._onSuspendStateChanged, this);
142
143 /** @type {!SDK.TracingModel.Event}|undefined */
144 this._selectedSearchResult;
146 } 145 }
147 146
148 /** 147 /**
149 * @return {!Timeline.TimelinePanel} 148 * @return {!Timeline.TimelinePanel}
150 */ 149 */
151 static instance() { 150 static instance() {
152 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T imeline.TimelinePanel)); 151 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T imeline.TimelinePanel));
153 } 152 }
154 153
155 /** 154 /**
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 return true; 1338 return true;
1340 case 'timeline.jump-to-next-frame': 1339 case 'timeline.jump-to-next-frame':
1341 panel._jumpToFrame(1); 1340 panel._jumpToFrame(1);
1342 return true; 1341 return true;
1343 } 1342 }
1344 return false; 1343 return false;
1345 } 1344 }
1346 }; 1345 };
1347 1346
1348 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g'); 1347 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698