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

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

Issue 2580053002: Revert "DevTools: Add "New" button to launch timeline landing page."
Patch Set: Created 4 years 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 | third_party/WebKit/Source/devtools/front_end/ui/toolbar.css » ('j') | 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) 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 287
288 _recreateToolbarItems() { 288 _recreateToolbarItems() {
289 this._panelToolbar.removeToolbarItems(); 289 this._panelToolbar.removeToolbarItems();
290 290
291 const perspectiveSetting = 291 const perspectiveSetting =
292 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa nel.Perspectives.Load); 292 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa nel.Perspectives.Load);
293 293
294 // Record 294 // Record
295 if (Runtime.experiments.isEnabled('timelineLandingPage')) { 295 if (Runtime.experiments.isEnabled('timelineLandingPage')) {
296 const newButton = new UI.ToolbarButton(
297 Common.UIString('New recording'), 'largeicon-add', Common.UIString('Ne w'));
298 newButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, thi s);
299 this._panelToolbar.appendToolbarItem(newButton);
300 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t oggleRecordAction)); 296 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t oggleRecordAction));
301 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('m ain.reload')); 297 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('m ain.reload'));
302 } else if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') && 298 } else if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') &&
303 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) { 299 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) {
304 const reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload '), 'largeicon-refresh'); 300 const reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload '), 'largeicon-refresh');
305 reloadButton.addEventListener(UI.ToolbarButton.Events.Click, () => SDK.tar getManager.reloadPage()); 301 reloadButton.addEventListener(UI.ToolbarButton.Events.Click, () => SDK.tar getManager.reloadPage());
306 this._panelToolbar.appendToolbarItem(reloadButton); 302 this._panelToolbar.appendToolbarItem(reloadButton);
307 } else { 303 } else {
308 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t oggleRecordAction)); 304 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t oggleRecordAction));
309 } 305 }
310 306
311 // Clear 307 // Clear
312 if (!Runtime.experiments.isEnabled('timelineLandingPage')) { 308 var clearButton = new UI.ToolbarButton(Common.UIString('Clear recording'), ' largeicon-clear');
313 const clearButton = new UI.ToolbarButton(Common.UIString('Clear recording' ), 'largeicon-clear'); 309 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, thi s);
314 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, t his); 310 this._panelToolbar.appendToolbarItem(clearButton);
315 this._panelToolbar.appendToolbarItem(clearButton);
316 }
317 311
318 this._panelToolbar.appendSeparator(); 312 this._panelToolbar.appendSeparator();
319 313
320 // Combo 314 // Combo
321 if (!Runtime.experiments.isEnabled('timelineLandingPage') && 315 if (!Runtime.experiments.isEnabled('timelineLandingPage') &&
322 Runtime.experiments.isEnabled('timelineRecordingPerspectives')) { 316 Runtime.experiments.isEnabled('timelineRecordingPerspectives')) {
323 /** 317 /**
324 * @this {!Timeline.TimelinePanel} 318 * @this {!Timeline.TimelinePanel}
325 */ 319 */
326 function onPerspectiveChanged() { 320 function onPerspectiveChanged() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 this._captureLayersAndPicturesSetting.set(false); 364 this._captureLayersAndPicturesSetting.set(false);
371 this._captureFilmStripSetting.set(false); 365 this._captureFilmStripSetting.set(false);
372 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.BottomUp , false); 366 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.BottomUp , false);
373 break; 367 break;
374 } 368 }
375 369
376 this._bulkUpdate = false; 370 this._bulkUpdate = false;
377 this._onModeChanged(); 371 this._onModeChanged();
378 } 372 }
379 373
380 // Checkboxes
381 if (Runtime.experiments.isEnabled('timelineLandingPage')) { 374 if (Runtime.experiments.isEnabled('timelineLandingPage')) {
382 if (!this._model.isEmpty()) { 375 if (!this._model.isEmpty()) {
383 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Common. UIString('Memory'), 376 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Common. UIString('Memory'),
384 this._showMemorySetting, Common.UIString('Show memory timeline.'))); 377 this._showMemorySetting, Common.UIString('Show memory timeline.')));
385 if (this._filmStripModel.frames().length) { 378 if (this._filmStripModel.frames().length) {
386 this._showScreenshotsSetting.set(true); 379 this._showScreenshotsSetting.set(true);
387 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Commo n.UIString('Screenshots'), 380 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Commo n.UIString('Screenshots'),
388 this._showScreenshotsSetting, Common.UIString('Show captured scree nshots.'))); 381 this._showScreenshotsSetting, Common.UIString('Show captured scree nshots.')));
389 } 382 }
390 } 383 }
(...skipping 30 matching lines...) Expand all
421 414
422 const traceProviders = Extensions.extensionServer.traceProviders(); 415 const traceProviders = Extensions.extensionServer.traceProviders();
423 if (traceProviders.length) { 416 if (traceProviders.length) {
424 this._panelToolbar.appendSeparator(); 417 this._panelToolbar.appendSeparator();
425 for (let provider of traceProviders) { 418 for (let provider of traceProviders) {
426 const setting = Timeline.TimelinePanel._settingForTraceProvider(provider ); 419 const setting = Timeline.TimelinePanel._settingForTraceProvider(provider );
427 const checkbox = this._createSettingCheckbox(provider.shortDisplayName() , setting, provider.longDisplayName()); 420 const checkbox = this._createSettingCheckbox(provider.shortDisplayName() , setting, provider.longDisplayName());
428 this._panelToolbar.appendToolbarItem(checkbox); 421 this._panelToolbar.appendToolbarItem(checkbox);
429 } 422 }
430 } 423 }
424 this._panelToolbar.appendSeparator();
425 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com ponents.collect-garbage'));
431 426
432 this._panelToolbar.appendSeparator(); 427 this._panelToolbar.appendSeparator();
433 this._cpuThrottlingCombobox = new UI.ToolbarComboBox(this._onCPUThrottlingCh anged.bind(this)); 428 this._cpuThrottlingCombobox = new UI.ToolbarComboBox(this._onCPUThrottlingCh anged.bind(this));
434 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect()); 429 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect());
435 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); 430 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox);
436 this._populateCPUThrottingCombobox(); 431 this._populateCPUThrottingCombobox();
437
438 this._panelToolbar.appendSeparator();
439 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com ponents.collect-garbage'));
440
441 this._updateTimelineControls(); 432 this._updateTimelineControls();
442 } 433 }
443 434
444 /** 435 /**
445 * @param {!Extensions.ExtensionTraceProvider} traceProvider 436 * @param {!Extensions.ExtensionTraceProvider} traceProvider
446 * @return {!Common.Setting<boolean>} 437 * @return {!Common.Setting<boolean>}
447 */ 438 */
448 static _settingForTraceProvider(traceProvider) { 439 static _settingForTraceProvider(traceProvider) {
449 var setting = traceProvider[Timeline.TimelinePanel._traceProviderSettingSymb ol]; 440 var setting = traceProvider[Timeline.TimelinePanel._traceProviderSettingSymb ol];
450 if (!setting) { 441 if (!setting) {
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 } 2086 }
2096 2087
2097 /** 2088 /**
2098 * @override 2089 * @override
2099 * @param {!SDK.Target} target 2090 * @param {!SDK.Target} target
2100 */ 2091 */
2101 targetRemoved(target) { 2092 targetRemoved(target) {
2102 this._targets.remove(target, true); 2093 this._targets.remove(target, true);
2103 } 2094 }
2104 }; 2095 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/toolbar.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698