| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 var centered = this._landingPage.contentElement.createChild('div'); | 680 var centered = this._landingPage.contentElement.createChild('div'); |
| 681 | 681 |
| 682 var p = centered.createChild('p'); | 682 var p = centered.createChild('p'); |
| 683 p.createTextChild(Common.UIString( | 683 p.createTextChild(Common.UIString( |
| 684 'The Performance panel lets you record what the browser does during page
load and user interaction. ' + | 684 'The Performance panel lets you record what the browser does during page
load and user interaction. ' + |
| 685 'The timeline it generates can help you determine why certain parts of y
our page are slow.')); | 685 'The timeline it generates can help you determine why certain parts of y
our page are slow.')); |
| 686 | 686 |
| 687 p = centered.createChild('p'); | 687 p = centered.createChild('p'); |
| 688 p.appendChild(UI.formatLocalized( | 688 p.appendChild(UI.formatLocalized( |
| 689 'To capture a new recording, click the record toolbar button or hit %s.
' + | 689 'To capture a new recording, click the record toolbar button or hit %s.
' + |
| 690 'To evaluate page load performance, hit %s to record the reload.', | 690 'To evaluate page load performance, hit %s to record the reload.', |
| 691 [recordNode, reloadNode])); | 691 [recordNode, reloadNode])); |
| 692 | 692 |
| 693 p = centered.createChild('p'); | 693 p = centered.createChild('p'); |
| 694 p.appendChild(UI.formatLocalized( | 694 p.appendChild(UI.formatLocalized( |
| 695 'After recording, select an area of interest in the overview by dragging
. ' + | 695 'After recording, select an area of interest in the overview by dragging
. ' + |
| 696 'Then, zoom and pan the timeline with the mousewheel or %s keys.', | 696 'Then, zoom and pan the timeline with the mousewheel or %s keys.', |
| 697 [navigateNode])); | 697 [navigateNode])); |
| 698 | 698 |
| 699 p = centered.createChild('p'); | 699 p = centered.createChild('p'); |
| 700 p.appendChild(learnMoreNode); | 700 p.appendChild(learnMoreNode); |
| 701 | 701 |
| 702 var timelineSpan = encloseWithTag('b', Common.UIString('Timeline')); | 702 var timelineSpan = encloseWithTag('b', Common.UIString('Timeline')); |
| 703 var performanceSpan = encloseWithTag('b', Common.UIString('Performance')); | 703 var performanceSpan = encloseWithTag('b', Common.UIString('Performance')); |
| 704 | 704 |
| 705 p = centered.createChild('p', 'timeline-landing-warning'); | 705 p = centered.createChild('p', 'timeline-landing-warning'); |
| 706 p.appendChild(UI.formatLocalized( | 706 p.appendChild(UI.formatLocalized( |
| 707 'The %s panel has been enriched with the JavaScript profiler capabilitie
s and is now called %s.%s' + | 707 'The %s panel has been enriched with the JavaScript profiler capabilitie
s and is now called %s.%s' + |
| 708 'You can find the legacy JavaScript CPU profiler under %s%s \u2192 More
Tools \u2192 JavaScript Profiler.', | 708 'You can find the legacy JavaScript CPU profiler under %s%s \u2192 M
ore Tools \u2192 JavaScript Profiler.', |
| 709 [timelineSpan, performanceSpan, createElement('p'), createElement('br'),
UI.Icon.create('largeicon-menu')])); | 709 [timelineSpan, performanceSpan, createElement('p'), createElement('br'),
UI.Icon.create('largeicon-menu')])); |
| 710 | 710 |
| 711 this._landingPage.show(this._statusPaneContainer); | 711 this._landingPage.show(this._statusPaneContainer); |
| 712 } | 712 } |
| 713 | 713 |
| 714 _hideLandingPage() { | 714 _hideLandingPage() { |
| 715 this._landingPage.detach(); | 715 this._landingPage.detach(); |
| 716 } | 716 } |
| 717 | 717 |
| 718 /** | 718 /** |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 this._textFilterUI = new UI.TextFilterUI(); | 1627 this._textFilterUI = new UI.TextFilterUI(); |
| 1628 this._textFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, textFi
lterChanged, this); | 1628 this._textFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, textFi
lterChanged, this); |
| 1629 this._filterBar.addFilter(this._textFilterUI); | 1629 this._filterBar.addFilter(this._textFilterUI); |
| 1630 | 1630 |
| 1631 var durationOptions = []; | 1631 var durationOptions = []; |
| 1632 for (var durationMs of Timeline.TimelineFilters._durationFilterPresetsMs) { | 1632 for (var durationMs of Timeline.TimelineFilters._durationFilterPresetsMs) { |
| 1633 var durationOption = {}; | 1633 var durationOption = {}; |
| 1634 if (!durationMs) { | 1634 if (!durationMs) { |
| 1635 durationOption.label = Common.UIString('All'); | 1635 durationOption.label = Common.UIString('All'); |
| 1636 durationOption.title = Common.UIString('Show all records'); | 1636 durationOption.title = Common.UIString('Show all records'); |
| 1637 durationOption.default = true; |
| 1637 } else { | 1638 } else { |
| 1638 durationOption.label = Common.UIString('\u2265 %dms', durationMs); | 1639 durationOption.label = Common.UIString('\u2265 %dms', durationMs); |
| 1639 durationOption.title = Common.UIString('Hide records shorter than %dms',
durationMs); | 1640 durationOption.title = Common.UIString('Hide records shorter than %dms',
durationMs); |
| 1640 } | 1641 } |
| 1641 durationOption.value = durationMs; | 1642 durationOption.value = String(durationMs); |
| 1642 durationOptions.push(durationOption); | 1643 durationOptions.push(durationOption); |
| 1643 } | 1644 } |
| 1644 var durationFilterUI = new UI.ComboBoxFilterUI(durationOptions); | 1645 var durationFilterUI = new UI.ComboBoxFilterUI(durationOptions); |
| 1645 durationFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, duration
FilterChanged, this); | 1646 durationFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, duration
FilterChanged, this); |
| 1646 this._filterBar.addFilter(durationFilterUI); | 1647 this._filterBar.addFilter(durationFilterUI); |
| 1647 | 1648 |
| 1648 var categoryFiltersUI = {}; | 1649 var categoryFiltersUI = {}; |
| 1649 var categories = Timeline.TimelineUIUtils.categories(); | 1650 var categories = Timeline.TimelineUIUtils.categories(); |
| 1650 for (var categoryName in categories) { | 1651 for (var categoryName in categories) { |
| 1651 var category = categories[categoryName]; | 1652 var category = categories[categoryName]; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 }; | 1696 }; |
| 1696 | 1697 |
| 1697 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); | 1698 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); |
| 1698 | 1699 |
| 1699 /** @enum {symbol} */ | 1700 /** @enum {symbol} */ |
| 1700 Timeline.TimelineFilters.Events = { | 1701 Timeline.TimelineFilters.Events = { |
| 1701 FilterChanged: Symbol('FilterChanged') | 1702 FilterChanged: Symbol('FilterChanged') |
| 1702 }; | 1703 }; |
| 1703 | 1704 |
| 1704 Timeline.TimelineFilters._durationFilterPresetsMs = [0, 1, 15]; | 1705 Timeline.TimelineFilters._durationFilterPresetsMs = [0, 1, 15]; |
| OLD | NEW |