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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 this._recordingOptionUIControls = []; | 296 this._recordingOptionUIControls = []; |
297 var checkboxItem = new WebInspector.ToolbarCheckbox(name, tooltip, setti
ng); | 297 var checkboxItem = new WebInspector.ToolbarCheckbox(name, tooltip, setti
ng); |
298 this._recordingOptionUIControls.push(checkboxItem); | 298 this._recordingOptionUIControls.push(checkboxItem); |
299 return checkboxItem; | 299 return checkboxItem; |
300 }, | 300 }, |
301 | 301 |
302 _createToolbarItems: function() | 302 _createToolbarItems: function() |
303 { | 303 { |
304 this._panelToolbar = new WebInspector.Toolbar(this.element); | 304 this._panelToolbar = new WebInspector.Toolbar(this.element); |
305 | 305 |
306 this.toggleTimelineButton = new WebInspector.ToolbarButton("Record timel
ine", "record-toolbar-item"); | 306 this.toggleTimelineButton = WebInspector.ToolbarButton.createActionButto
n("timeline.toggle-recording"); |
307 this.toggleTimelineButton.addEventListener("click", this._toggleTimeline
ButtonClicked, this); | |
308 this._panelToolbar.appendToolbarItem(this.toggleTimelineButton); | 307 this._panelToolbar.appendToolbarItem(this.toggleTimelineButton); |
309 this._updateToggleTimelineButton(false); | 308 this._updateToggleTimelineButton(false); |
310 | 309 |
311 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Clear recording"), "clear-toolbar-item"); | 310 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Clear recording"), "clear-toolbar-item"); |
312 clearButton.addEventListener("click", this._onClearButtonClick, this); | 311 clearButton.addEventListener("click", this._onClearButtonClick, this); |
313 this._panelToolbar.appendToolbarItem(clearButton); | 312 this._panelToolbar.appendToolbarItem(clearButton); |
314 this._panelToolbar.appendSeparator(); | 313 this._panelToolbar.appendSeparator(); |
315 | 314 |
316 this._filterBar = this._createFilterBar(); | 315 this._filterBar = this._createFilterBar(); |
317 this._panelToolbar.appendToolbarItem(this._filterBar.filterButton()); | 316 this._panelToolbar.appendToolbarItem(this._filterBar.filterButton()); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 this._dropTarget.setEnabled(!this._operationInProgress); | 469 this._dropTarget.setEnabled(!this._operationInProgress); |
471 | 470 |
472 this._progressToolbarItem.setVisible(this._operationInProgress); | 471 this._progressToolbarItem.setVisible(this._operationInProgress); |
473 this._progressToolbarItem.element.removeChildren(); | 472 this._progressToolbarItem.element.removeChildren(); |
474 if (indicator) | 473 if (indicator) |
475 this._progressToolbarItem.element.appendChild(indicator.element); | 474 this._progressToolbarItem.element.appendChild(indicator.element); |
476 }, | 475 }, |
477 | 476 |
478 _registerShortcuts: function() | 477 _registerShortcuts: function() |
479 { | 478 { |
480 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.StartStopRecording, this._toggleTimelineButtonClicked.bind(this)); | |
481 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.SaveToFile, this._saveToFile.bind(this)); | 479 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.SaveToFile, this._saveToFile.bind(this)); |
482 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.LoadFromFile, this._selectFileToLoad.bind(this)); | 480 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.LoadFromFile, this._selectFileToLoad.bind(this)); |
483 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToPreviousFrame, this._jumpToFrame.bind(this, -1)); | 481 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToPreviousFrame, this._jumpToFrame.bind(this, -1)); |
484 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToNextFrame, this._jumpToFrame.bind(this, 1)); | 482 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToNextFrame, this._jumpToFrame.bind(this, 1)); |
485 }, | 483 }, |
486 | 484 |
487 _createFileSelector: function() | 485 _createFileSelector: function() |
488 { | 486 { |
489 if (this._fileSelectorElement) | 487 if (this._fileSelectorElement) |
490 this._fileSelectorElement.remove(); | 488 this._fileSelectorElement.remove(); |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 /** | 1792 /** |
1795 * @override | 1793 * @override |
1796 * @param {string} value | 1794 * @param {string} value |
1797 */ | 1795 */ |
1798 handleQueryParam: function(value) | 1796 handleQueryParam: function(value) |
1799 { | 1797 { |
1800 WebInspector.TimelinePanel.show(); | 1798 WebInspector.TimelinePanel.show(); |
1801 WebInspector.TimelinePanel.instance()._loadFromURL(value); | 1799 WebInspector.TimelinePanel.instance()._loadFromURL(value); |
1802 } | 1800 } |
1803 } | 1801 } |
| 1802 |
| 1803 /** |
| 1804 * @constructor |
| 1805 * @implements {WebInspector.ActionDelegate} |
| 1806 */ |
| 1807 WebInspector.TimelinePanel.RecordActionDelegate = function() |
| 1808 { |
| 1809 } |
| 1810 |
| 1811 WebInspector.TimelinePanel.RecordActionDelegate.prototype = { |
| 1812 /** |
| 1813 * @override |
| 1814 * @param {!WebInspector.Context} context |
| 1815 * @param {string} actionId |
| 1816 */ |
| 1817 handleAction: function(context, actionId) |
| 1818 { |
| 1819 if (WebInspector.inspectorView.currentPanel().name !== "timeline") |
| 1820 return; |
| 1821 WebInspector.TimelinePanel.instance()._toggleTimelineButtonClicked(); |
| 1822 } |
| 1823 } |
OLD | NEW |