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

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

Issue 2689213012: 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'));
121 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ onMainViewChanged.bind(this)); 125 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ onMainViewChanged.bind(this));
122 this._tabbedPane.selectTab(this._viewModeSetting.get()); 126 this._tabbedPane.selectTab(this._viewModeSetting.get());
123 } else { 127 } else {
124 // Create top level properties splitter. 128 // Create top level properties splitter.
125 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState', 400); 129 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState', 400);
126 this._detailsSplitWidget.element.classList.add('timeline-details-split'); 130 this._detailsSplitWidget.element.classList.add('timeline-details-split');
127 this._detailsView = new Timeline.TimelineDetailsView(this._filters, this); 131 this._detailsView = new Timeline.TimelineDetailsView(this._filters, this);
128 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ; 132 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ;
129 this._detailsSplitWidget.setSidebarWidget(this._detailsView); 133 this._detailsSplitWidget.setSidebarWidget(this._detailsView);
130 this._detailsSplitWidget.setMainWidget(this._stackView); 134 this._detailsSplitWidget.setMainWidget(this._stackView);
131 this._detailsSplitWidget.hideSidebar(); 135 this._detailsSplitWidget.hideSidebar();
132 this._detailsSplitWidget.show(this._timelinePane.element); 136 this._detailsSplitWidget.show(this._timelinePane.element);
133 } 137 }
134 138
135 this._onModeChanged(); 139 this._onModeChanged();
136 this._populateToolbar(); 140 this._populateToolbar();
137 this._showLandingPage(); 141 this._showLandingPage();
138 142
139 Extensions.extensionServer.addEventListener( 143 Extensions.extensionServer.addEventListener(
140 Extensions.ExtensionServer.Events.TraceProviderAdded, this._appendExtens ionsToToolbar, this); 144 Extensions.ExtensionServer.Events.TraceProviderAdded, this._appendExtens ionsToToolbar, this);
141 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan ged, this._onSuspendStateChanged, this); 145 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan ged, this._onSuspendStateChanged, this);
142
143 /** @type {!SDK.TracingModel.Event}|undefined */
144 this._selectedSearchResult;
145 } 146 }
146 147
147 /** 148 /**
148 * @return {!Timeline.TimelinePanel} 149 * @return {!Timeline.TimelinePanel}
149 */ 150 */
150 static instance() { 151 static instance() {
151 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T imeline.TimelinePanel)); 152 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T imeline.TimelinePanel));
152 } 153 }
153 154
154 /** 155 /**
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 return true; 1339 return true;
1339 case 'timeline.jump-to-next-frame': 1340 case 'timeline.jump-to-next-frame':
1340 panel._jumpToFrame(1); 1341 panel._jumpToFrame(1);
1341 return true; 1342 return true;
1342 } 1343 }
1343 return false; 1344 return false;
1344 } 1345 }
1345 }; 1346 };
1346 1347
1347 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g'); 1348 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698