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

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

Issue 2666013002: DevTools: render console filter in the main console toolbar. (Closed)
Patch Set: Introduce progress monitor 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // View 294 // View
295 this._panelToolbar.appendSeparator(); 295 this._panelToolbar.appendSeparator();
296 this._showScreenshotsToolbarCheckbox = this._createSettingCheckbox( 296 this._showScreenshotsToolbarCheckbox = this._createSettingCheckbox(
297 Common.UIString('Screenshots'), this._showScreenshotsSetting, Common.UIS tring('Capture screenshots')); 297 Common.UIString('Screenshots'), this._showScreenshotsSetting, Common.UIS tring('Capture screenshots'));
298 this._panelToolbar.appendToolbarItem(this._showScreenshotsToolbarCheckbox); 298 this._panelToolbar.appendToolbarItem(this._showScreenshotsToolbarCheckbox);
299 299
300 this._showMemoryToolbarCheckbox = this._createSettingCheckbox( 300 this._showMemoryToolbarCheckbox = this._createSettingCheckbox(
301 Common.UIString('Memory'), this._showMemorySetting, Common.UIString('Sho w memory timeline.')); 301 Common.UIString('Memory'), this._showMemorySetting, Common.UIString('Sho w memory timeline.'));
302 this._panelToolbar.appendToolbarItem(this._showMemoryToolbarCheckbox); 302 this._panelToolbar.appendToolbarItem(this._showMemoryToolbarCheckbox);
303 303
304 // Settings
305 this._panelToolbar.appendToolbarItem(this._showSettingsPaneButton);
306
307 // GC 304 // GC
308 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com ponents.collect-garbage')); 305 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('com ponents.collect-garbage'));
306
307 // Settings
308 this._panelToolbar.appendSpacer();
309 this._panelToolbar.appendText('');
310 this._panelToolbar.appendSeparator();
311 this._panelToolbar.appendToolbarItem(this._showSettingsPaneButton);
309 } 312 }
310 313
311 _createSettingsPane() { 314 _createSettingsPane() {
312 this._showSettingsPaneSetting = Common.settings.createSetting('timelineShowS ettingsToolbar', false); 315 this._showSettingsPaneSetting = Common.settings.createSetting('timelineShowS ettingsToolbar', false);
313 this._showSettingsPaneButton = new UI.ToolbarSettingToggle( 316 this._showSettingsPaneButton = new UI.ToolbarSettingToggle(
314 this._showSettingsPaneSetting, 'largeicon-settings-gear', Common.UIStrin g('Capture settings')); 317 this._showSettingsPaneSetting, 'largeicon-settings-gear', Common.UIStrin g('Capture settings'));
315 SDK.multitargetNetworkManager.addEventListener( 318 SDK.multitargetNetworkManager.addEventListener(
316 SDK.MultitargetNetworkManager.Events.ConditionsChanged, this._updateShow SettingsToolbarButton, this); 319 SDK.MultitargetNetworkManager.Events.ConditionsChanged, this._updateShow SettingsToolbarButton, this);
317 this._cpuThrottlingManager.addEventListener( 320 this._cpuThrottlingManager.addEventListener(
318 Components.CPUThrottlingManager.Events.RateChanged, this._updateShowSett ingsToolbarButton, this); 321 Components.CPUThrottlingManager.Events.RateChanged, this._updateShowSett ingsToolbarButton, this);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptorsForAction('ti meline.toggle-recording')[0].name); 716 encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptorsForAction('ti meline.toggle-recording')[0].name);
714 var reloadNode = encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptors ForAction('main.reload')[0].name); 717 var reloadNode = encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptors ForAction('main.reload')[0].name);
715 var navigateNode = encloseWithTag('b', Common.UIString('WASD')); 718 var navigateNode = encloseWithTag('b', Common.UIString('WASD'));
716 719
717 this._landingPage = new UI.VBox(); 720 this._landingPage = new UI.VBox();
718 this._landingPage.contentElement.classList.add('timeline-landing-page', 'fil l'); 721 this._landingPage.contentElement.classList.add('timeline-landing-page', 'fil l');
719 var centered = this._landingPage.contentElement.createChild('div'); 722 var centered = this._landingPage.contentElement.createChild('div');
720 723
721 centered.createChild('p').appendChild(UI.formatLocalized( 724 centered.createChild('p').appendChild(UI.formatLocalized(
722 'To capture a new recording, click the record button or hit %s.%s' + 725 'To capture a new recording, click the record button or hit %s.%s' +
723 'To evaluate the page load, click the reload button or hit %s to record the reload.', 726 'To evaluate the page load, click the reload button or hit %s to rec ord the reload.',
724 [recordNode, createElement('br'), reloadNode])); 727 [recordNode, createElement('br'), reloadNode]));
725 728
726 centered.createChild('p').appendChild(UI.formatLocalized( 729 centered.createChild('p').appendChild(UI.formatLocalized(
727 'After recording, select an area of interest in the overview by dragging . ' + 730 'After recording, select an area of interest in the overview by dragging . ' +
728 'Then, zoom and pan the timeline with the mousewheel or %s keys. %s', 731 'Then, zoom and pan the timeline with the mousewheel or %s keys. %s' ,
729 [navigateNode, learnMoreNode])); 732 [navigateNode, learnMoreNode]));
730 733
731 var cpuProfilerHintSetting = Common.settings.createSetting('timelineShowProf ilerHint', true); 734 var cpuProfilerHintSetting = Common.settings.createSetting('timelineShowProf ilerHint', true);
732 if (cpuProfilerHintSetting.get()) { 735 if (cpuProfilerHintSetting.get()) {
733 var warning = centered.createChild('p', 'timeline-landing-warning'); 736 var warning = centered.createChild('p', 'timeline-landing-warning');
734 var closeButton = warning.createChild('div', 'timeline-landing-warning-clo se', 'dt-close-button'); 737 var closeButton = warning.createChild('div', 'timeline-landing-warning-clo se', 'dt-close-button');
735 closeButton.addEventListener('click', () => { 738 closeButton.addEventListener('click', () => {
736 warning.style.visibility = 'hidden'; 739 warning.style.visibility = 'hidden';
737 cpuProfilerHintSetting.set(false); 740 cpuProfilerHintSetting.set(false);
738 }, false); 741 }, false);
739 var performanceSpan = encloseWithTag('b', Common.UIString('Performance')); 742 var performanceSpan = encloseWithTag('b', Common.UIString('Performance'));
740 warning.createChild('div').appendChild(UI.formatLocalized( 743 warning.createChild('div').appendChild(UI.formatLocalized(
741 'The %s panel provides the combined functionality of Timeline and CPU profiler.%s' + 744 'The %s panel provides the combined functionality of Timeline and CPU profiler.%s' +
742 'The JavaScript CPU profiler will be removed shortly. Meanwhile, it\'s available under ' + 745 'The JavaScript CPU profiler will be removed shortly. Meanwhile, i t\'s available under ' +
743 '%s \u2192 More Tools \u2192 JavaScript Profiler.', 746 '%s \u2192 More Tools \u2192 JavaScript Profiler.',
744 [performanceSpan, createElement('p'), UI.Icon.create('largeicon-menu') ])); 747 [performanceSpan, createElement('p'), UI.Icon.create('largeicon-menu') ]));
745 } 748 }
746 749
747 this._landingPage.show(this._statusPaneContainer); 750 this._landingPage.show(this._statusPaneContainer);
748 } 751 }
749 752
750 _hideLandingPage() { 753 _hideLandingPage() {
751 this._landingPage.detach(); 754 this._landingPage.detach();
752 } 755 }
753 756
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 return true; 1549 return true;
1547 case 'timeline.jump-to-next-frame': 1550 case 'timeline.jump-to-next-frame':
1548 panel._jumpToFrame(1); 1551 panel._jumpToFrame(1);
1549 return true; 1552 return true;
1550 } 1553 }
1551 return false; 1554 return false;
1552 } 1555 }
1553 }; 1556 };
1554 1557
1555 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g'); 1558 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin g');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698