| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @implements {WebInspector.TabbedEditorContainerDelegate} | 7 * @implements {WebInspector.TabbedEditorContainerDelegate} |
| 8 * @implements {WebInspector.Searchable} | 8 * @implements {WebInspector.Searchable} |
| 9 * @implements {WebInspector.Replaceable} | 9 * @implements {WebInspector.Replaceable} |
| 10 * @extends {WebInspector.VBox} | 10 * @extends {WebInspector.VBox} |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.JumpToNextLocation, this._onJumpToNextLocation.bind(this)); | 104 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.JumpToNextLocation, this._onJumpToNextLocation.bind(this)); |
| 105 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.CloseEditorTab, this._onCloseEditorTab.bind(this)); | 105 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.CloseEditorTab, this._onCloseEditorTab.bind(this)); |
| 106 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.GoToLine, this._showGoToLineDialog.bind(this)); | 106 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.GoToLine, this._showGoToLineDialog.bind(this)); |
| 107 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.GoToMember, this._showOutlineDialog.bind(this)); | 107 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.GoToMember, this._showOutlineDialog.bind(this)); |
| 108 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.ToggleBreakpoint, this._toggleBreakpoint.bind(this)); | 108 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.ToggleBreakpoint, this._toggleBreakpoint.bind(this)); |
| 109 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.Save, this._save.bind(this)); | 109 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.Save, this._save.bind(this)); |
| 110 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.SaveAll, this._saveAll.bind(this)); | 110 registerShortcut.call(this, WebInspector.ShortcutsScreen.SourcesPanelSho
rtcuts.SaveAll, this._saveAll.bind(this)); |
| 111 }, | 111 }, |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * @return {!WebInspector.Toolbar} |
| 115 */ |
| 116 leftToolbar: function() |
| 117 { |
| 118 return this._editorContainer.leftToolbar(); |
| 119 }, |
| 120 |
| 121 /** |
| 122 * @return {!WebInspector.Toolbar} |
| 123 */ |
| 124 rightToolbar: function() |
| 125 { |
| 126 return this._editorContainer.rightToolbar(); |
| 127 }, |
| 128 |
| 129 /** |
| 114 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys | 130 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys |
| 115 * @param {function(!Event=):boolean} handler | 131 * @param {function(!Event=):boolean} handler |
| 116 */ | 132 */ |
| 117 _registerShortcuts: function(keys, handler) | 133 _registerShortcuts: function(keys, handler) |
| 118 { | 134 { |
| 119 for (var i = 0; i < keys.length; ++i) | 135 for (var i = 0; i < keys.length; ++i) |
| 120 this._shortcuts[keys[i].key] = handler; | 136 this._shortcuts[keys[i].key] = handler; |
| 121 }, | 137 }, |
| 122 | 138 |
| 123 _handleKeyDown: function(event) | 139 _handleKeyDown: function(event) |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 * @return {boolean} | 791 * @return {boolean} |
| 776 */ | 792 */ |
| 777 handleAction: function(context, actionId) | 793 handleAction: function(context, actionId) |
| 778 { | 794 { |
| 779 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); | 795 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); |
| 780 if (!sourcesView) | 796 if (!sourcesView) |
| 781 return false; | 797 return false; |
| 782 sourcesView._editorContainer.closeAllFiles(); | 798 sourcesView._editorContainer.closeAllFiles(); |
| 783 return true; | 799 return true; |
| 784 } | 800 } |
| 785 } | 801 } |
| OLD | NEW |