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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = new WebInspector.ToolbarButton("Record timel
ine", "record-toolbar-item"); |
307 this.toggleTimelineButton.addEventListener("click", this._toggleTimeline
ButtonClicked, this); | 307 this.toggleTimelineButton.setAction("timeline.toggle-recording"); |
308 this._panelToolbar.appendToolbarItem(this.toggleTimelineButton); | 308 this._panelToolbar.appendToolbarItem(this.toggleTimelineButton); |
309 this._updateToggleTimelineButton(false); | 309 this._updateToggleTimelineButton(false); |
310 | 310 |
311 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Clear recording"), "clear-toolbar-item"); | 311 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Clear recording"), "clear-toolbar-item"); |
312 clearButton.addEventListener("click", this._onClearButtonClick, this); | 312 clearButton.addEventListener("click", this._onClearButtonClick, this); |
313 this._panelToolbar.appendToolbarItem(clearButton); | 313 this._panelToolbar.appendToolbarItem(clearButton); |
314 this._panelToolbar.appendSeparator(); | 314 this._panelToolbar.appendSeparator(); |
315 | 315 |
316 this._filterBar = this._createFilterBar(); | 316 this._filterBar = this._createFilterBar(); |
317 this._panelToolbar.appendToolbarItem(this._filterBar.filterButton()); | 317 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); | 470 this._dropTarget.setEnabled(!this._operationInProgress); |
471 | 471 |
472 this._progressToolbarItem.setVisible(this._operationInProgress); | 472 this._progressToolbarItem.setVisible(this._operationInProgress); |
473 this._progressToolbarItem.element.removeChildren(); | 473 this._progressToolbarItem.element.removeChildren(); |
474 if (indicator) | 474 if (indicator) |
475 this._progressToolbarItem.element.appendChild(indicator.element); | 475 this._progressToolbarItem.element.appendChild(indicator.element); |
476 }, | 476 }, |
477 | 477 |
478 _registerShortcuts: function() | 478 _registerShortcuts: function() |
479 { | 479 { |
480 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.StartStopRecording, this._toggleTimelineButtonClicked.bind(this)); | |
481 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.SaveToFile, this._saveToFile.bind(this)); | 480 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.SaveToFile, this._saveToFile.bind(this)); |
482 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.LoadFromFile, this._selectFileToLoad.bind(this)); | 481 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.LoadFromFile, this._selectFileToLoad.bind(this)); |
483 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToPreviousFrame, this._jumpToFrame.bind(this, -1)); | 482 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)); | 483 this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcu
ts.JumpToNextFrame, this._jumpToFrame.bind(this, 1)); |
485 }, | 484 }, |
486 | 485 |
487 _createFileSelector: function() | 486 _createFileSelector: function() |
488 { | 487 { |
489 if (this._fileSelectorElement) | 488 if (this._fileSelectorElement) |
490 this._fileSelectorElement.remove(); | 489 this._fileSelectorElement.remove(); |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 /** | 1855 /** |
1857 * @override | 1856 * @override |
1858 * @param {string} value | 1857 * @param {string} value |
1859 */ | 1858 */ |
1860 handleQueryParam: function(value) | 1859 handleQueryParam: function(value) |
1861 { | 1860 { |
1862 WebInspector.TimelinePanel.show(); | 1861 WebInspector.TimelinePanel.show(); |
1863 WebInspector.TimelinePanel.instance()._loadFromURL(value); | 1862 WebInspector.TimelinePanel.instance()._loadFromURL(value); |
1864 } | 1863 } |
1865 } | 1864 } |
| 1865 |
| 1866 /** |
| 1867 * @constructor |
| 1868 * @implements {WebInspector.ActionDelegate} |
| 1869 */ |
| 1870 WebInspector.TimelinePanel.RecordActionDelegate = function() |
| 1871 { |
| 1872 } |
| 1873 |
| 1874 WebInspector.TimelinePanel.RecordActionDelegate.prototype = { |
| 1875 /** |
| 1876 * @override |
| 1877 * @param {!WebInspector.Context} context |
| 1878 * @param {string} actionId |
| 1879 */ |
| 1880 handleAction: function(context, actionId) |
| 1881 { |
| 1882 if (WebInspector.inspectorView.currentPanel().name !== "timeline") |
| 1883 return; |
| 1884 WebInspector.TimelinePanel.instance()._toggleTimelineButtonClicked(); |
| 1885 } |
| 1886 } |
OLD | NEW |