| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 for (var i = 0; i < unsavedSourceCodes.length; ++i) | 70 for (var i = 0; i < unsavedSourceCodes.length; ++i) |
| 71 WebInspector.Revealer.reveal(unsavedSourceCodes[i]); | 71 WebInspector.Revealer.reveal(unsavedSourceCodes[i]); |
| 72 } | 72 } |
| 73 if (!window.opener) | 73 if (!window.opener) |
| 74 window.addEventListener("beforeunload", handleBeforeUnload, true); | 74 window.addEventListener("beforeunload", handleBeforeUnload, true); |
| 75 | 75 |
| 76 this._shortcuts = {}; | 76 this._shortcuts = {}; |
| 77 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal
se); | 77 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal
se); |
| 78 } | 78 } |
| 79 | 79 |
| 80 /** @enum {symbol} */ |
| 80 WebInspector.SourcesView.Events = { | 81 WebInspector.SourcesView.Events = { |
| 81 EditorClosed: "EditorClosed", | 82 EditorClosed: Symbol("EditorClosed"), |
| 82 EditorSelected: "EditorSelected", | 83 EditorSelected: Symbol("EditorSelected"), |
| 83 } | 84 } |
| 84 | 85 |
| 85 WebInspector.SourcesView.prototype = { | 86 WebInspector.SourcesView.prototype = { |
| 86 /** | 87 /** |
| 87 * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, func
tion(!Event=):boolean)} registerShortcutDelegate | 88 * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, func
tion(!Event=):boolean)} registerShortcutDelegate |
| 88 */ | 89 */ |
| 89 registerShortcuts: function(registerShortcutDelegate) | 90 registerShortcuts: function(registerShortcutDelegate) |
| 90 { | 91 { |
| 91 /** | 92 /** |
| 92 * @this {WebInspector.SourcesView} | 93 * @this {WebInspector.SourcesView} |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 */ | 776 */ |
| 776 handleAction: function(context, actionId) | 777 handleAction: function(context, actionId) |
| 777 { | 778 { |
| 778 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); | 779 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); |
| 779 if (!sourcesView) | 780 if (!sourcesView) |
| 780 return false; | 781 return false; |
| 781 sourcesView._editorContainer.closeAllFiles(); | 782 sourcesView._editorContainer.closeAllFiles(); |
| 782 return true; | 783 return true; |
| 783 } | 784 } |
| 784 } | 785 } |
| OLD | NEW |