| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 _recreateToolbarItems() { | 275 _recreateToolbarItems() { |
| 276 this._panelToolbar.removeToolbarItems(); | 276 this._panelToolbar.removeToolbarItems(); |
| 277 | 277 |
| 278 var perspectiveSetting = | 278 var perspectiveSetting = |
| 279 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa
nel.Perspectives.Load); | 279 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa
nel.Perspectives.Load); |
| 280 | 280 |
| 281 // Record | 281 // Record |
| 282 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') && | 282 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') && |
| 283 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) { | 283 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) { |
| 284 this._reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload
'), 'largeicon-refresh'); | 284 this._reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload
'), 'largeicon-refresh'); |
| 285 this._reloadButton.addEventListener(UI.ToolbarButton.Events.Click, () => S
DK.targetManager.reloadPage()); | 285 this._reloadButton.addEventListener('click', () => SDK.targetManager.reloa
dPage()); |
| 286 this._panelToolbar.appendToolbarItem(this._reloadButton); | 286 this._panelToolbar.appendToolbarItem(this._reloadButton); |
| 287 } else { | 287 } else { |
| 288 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t
oggleRecordAction)); | 288 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t
oggleRecordAction)); |
| 289 } | 289 } |
| 290 | 290 |
| 291 // Clear | 291 // Clear |
| 292 var clearButton = new UI.ToolbarButton(Common.UIString('Clear recording'), '
largeicon-clear'); | 292 var clearButton = new UI.ToolbarButton(Common.UIString('Clear recording'), '
largeicon-clear'); |
| 293 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, thi
s); | 293 clearButton.addEventListener('click', this._clear, this); |
| 294 this._panelToolbar.appendToolbarItem(clearButton); | 294 this._panelToolbar.appendToolbarItem(clearButton); |
| 295 | 295 |
| 296 this._panelToolbar.appendSeparator(); | 296 this._panelToolbar.appendSeparator(); |
| 297 | 297 |
| 298 // Combo | 298 // Combo |
| 299 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives')) { | 299 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives')) { |
| 300 /** | 300 /** |
| 301 * @this {!Timeline.TimelinePanel} | 301 * @this {!Timeline.TimelinePanel} |
| 302 */ | 302 */ |
| 303 function onPerspectiveChanged() { | 303 function onPerspectiveChanged() { |
| (...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1944 } | 1944 } |
| 1945 | 1945 |
| 1946 /** | 1946 /** |
| 1947 * @override | 1947 * @override |
| 1948 * @param {!SDK.Target} target | 1948 * @param {!SDK.Target} target |
| 1949 */ | 1949 */ |
| 1950 targetRemoved(target) { | 1950 targetRemoved(target) { |
| 1951 this._targets.remove(target, true); | 1951 this._targets.remove(target, true); |
| 1952 } | 1952 } |
| 1953 }; | 1953 }; |
| OLD | NEW |