| OLD | NEW |
| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 return setting; | 372 return setting; |
| 373 } | 373 } |
| 374 | 374 |
| 375 /** | 375 /** |
| 376 * @return {!UI.ToolbarComboBox} | 376 * @return {!UI.ToolbarComboBox} |
| 377 */ | 377 */ |
| 378 _createNetworkConditionsSelect() { | 378 _createNetworkConditionsSelect() { |
| 379 var toolbarItem = new UI.ToolbarComboBox(null); | 379 var toolbarItem = new UI.ToolbarComboBox(null); |
| 380 toolbarItem.setMaxWidth(140); | 380 toolbarItem.setMaxWidth(140); |
| 381 Components.NetworkConditionsSelector.decorateSelect(toolbarItem.selectElemen
t()); | 381 NetworkConditions.NetworkConditionsSelector.decorateSelect(toolbarItem.selec
tElement()); |
| 382 return toolbarItem; | 382 return toolbarItem; |
| 383 } | 383 } |
| 384 | 384 |
| 385 _prepareToLoadTimeline() { | 385 _prepareToLoadTimeline() { |
| 386 console.assert(this._state === Timeline.TimelinePanel.State.Idle); | 386 console.assert(this._state === Timeline.TimelinePanel.State.Idle); |
| 387 this._setState(Timeline.TimelinePanel.State.Loading); | 387 this._setState(Timeline.TimelinePanel.State.Loading); |
| 388 } | 388 } |
| 389 | 389 |
| 390 _createFileSelector() { | 390 _createFileSelector() { |
| 391 if (this._fileSelectorElement) | 391 if (this._fileSelectorElement) |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptorsForAction('ti
meline.toggle-recording')[0].name); | 713 encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptorsForAction('ti
meline.toggle-recording')[0].name); |
| 714 var reloadNode = encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptors
ForAction('main.reload')[0].name); | 714 var reloadNode = encloseWithTag('b', UI.shortcutRegistry.shortcutDescriptors
ForAction('main.reload')[0].name); |
| 715 var navigateNode = encloseWithTag('b', Common.UIString('WASD')); | 715 var navigateNode = encloseWithTag('b', Common.UIString('WASD')); |
| 716 | 716 |
| 717 this._landingPage = new UI.VBox(); | 717 this._landingPage = new UI.VBox(); |
| 718 this._landingPage.contentElement.classList.add('timeline-landing-page', 'fil
l'); | 718 this._landingPage.contentElement.classList.add('timeline-landing-page', 'fil
l'); |
| 719 var centered = this._landingPage.contentElement.createChild('div'); | 719 var centered = this._landingPage.contentElement.createChild('div'); |
| 720 | 720 |
| 721 centered.createChild('p').appendChild(UI.formatLocalized( | 721 centered.createChild('p').appendChild(UI.formatLocalized( |
| 722 'To capture a new recording, click the record button or hit %s.%s' + | 722 '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.', | 723 'To evaluate the page load, click the reload button or hit %s to rec
ord the reload.', |
| 724 [recordNode, createElement('br'), reloadNode])); | 724 [recordNode, createElement('br'), reloadNode])); |
| 725 | 725 |
| 726 centered.createChild('p').appendChild(UI.formatLocalized( | 726 centered.createChild('p').appendChild(UI.formatLocalized( |
| 727 'After recording, select an area of interest in the overview by dragging
. ' + | 727 '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', | 728 'Then, zoom and pan the timeline with the mousewheel or %s keys. %s'
, |
| 729 [navigateNode, learnMoreNode])); | 729 [navigateNode, learnMoreNode])); |
| 730 | 730 |
| 731 var cpuProfilerHintSetting = Common.settings.createSetting('timelineShowProf
ilerHint', true); | 731 var cpuProfilerHintSetting = Common.settings.createSetting('timelineShowProf
ilerHint', true); |
| 732 if (cpuProfilerHintSetting.get()) { | 732 if (cpuProfilerHintSetting.get()) { |
| 733 var warning = centered.createChild('p', 'timeline-landing-warning'); | 733 var warning = centered.createChild('p', 'timeline-landing-warning'); |
| 734 var closeButton = warning.createChild('div', 'timeline-landing-warning-clo
se', 'dt-close-button'); | 734 var closeButton = warning.createChild('div', 'timeline-landing-warning-clo
se', 'dt-close-button'); |
| 735 closeButton.addEventListener('click', () => { | 735 closeButton.addEventListener('click', () => { |
| 736 warning.style.visibility = 'hidden'; | 736 warning.style.visibility = 'hidden'; |
| 737 cpuProfilerHintSetting.set(false); | 737 cpuProfilerHintSetting.set(false); |
| 738 }, false); | 738 }, false); |
| 739 var performanceSpan = encloseWithTag('b', Common.UIString('Performance')); | 739 var performanceSpan = encloseWithTag('b', Common.UIString('Performance')); |
| 740 warning.createChild('div').appendChild(UI.formatLocalized( | 740 warning.createChild('div').appendChild(UI.formatLocalized( |
| 741 'The %s panel provides the combined functionality of Timeline and CPU
profiler.%s' + | 741 '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 ' + | 742 'The JavaScript CPU profiler will be removed shortly. Meanwhile, i
t\'s available under ' + |
| 743 '%s \u2192 More Tools \u2192 JavaScript Profiler.', | 743 '%s \u2192 More Tools \u2192 JavaScript Profiler.', |
| 744 [performanceSpan, createElement('p'), UI.Icon.create('largeicon-menu')
])); | 744 [performanceSpan, createElement('p'), UI.Icon.create('largeicon-menu')
])); |
| 745 } | 745 } |
| 746 | 746 |
| 747 this._landingPage.show(this._statusPaneContainer); | 747 this._landingPage.show(this._statusPaneContainer); |
| 748 } | 748 } |
| 749 | 749 |
| 750 _hideLandingPage() { | 750 _hideLandingPage() { |
| 751 this._landingPage.detach(); | 751 this._landingPage.detach(); |
| 752 } | 752 } |
| 753 | 753 |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 return true; | 1546 return true; |
| 1547 case 'timeline.jump-to-next-frame': | 1547 case 'timeline.jump-to-next-frame': |
| 1548 panel._jumpToFrame(1); | 1548 panel._jumpToFrame(1); |
| 1549 return true; | 1549 return true; |
| 1550 } | 1550 } |
| 1551 return false; | 1551 return false; |
| 1552 } | 1552 } |
| 1553 }; | 1553 }; |
| 1554 | 1554 |
| 1555 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); | 1555 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); |
| OLD | NEW |