| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 }, | 168 }, |
| 169 | 169 |
| 170 _handleKeyDown: function(event) | 170 _handleKeyDown: function(event) |
| 171 { | 171 { |
| 172 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(event); | 172 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(event); |
| 173 var handler = this._shortcuts[shortcutKey]; | 173 var handler = this._shortcuts[shortcutKey]; |
| 174 if (handler && handler()) | 174 if (handler && handler()) |
| 175 event.consume(true); | 175 event.consume(true); |
| 176 }, | 176 }, |
| 177 | 177 |
| 178 /** |
| 179 * @override |
| 180 */ |
| 178 wasShown: function() | 181 wasShown: function() |
| 179 { | 182 { |
| 180 WebInspector.VBox.prototype.wasShown.call(this); | 183 WebInspector.VBox.prototype.wasShown.call(this); |
| 181 WebInspector.context.setFlavor(WebInspector.SourcesView, this); | 184 WebInspector.context.setFlavor(WebInspector.SourcesView, this); |
| 182 }, | 185 }, |
| 183 | 186 |
| 187 /** |
| 188 * @override |
| 189 */ |
| 184 willHide: function() | 190 willHide: function() |
| 185 { | 191 { |
| 186 WebInspector.context.setFlavor(WebInspector.SourcesView, null); | 192 WebInspector.context.setFlavor(WebInspector.SourcesView, null); |
| 187 WebInspector.VBox.prototype.willHide.call(this); | 193 WebInspector.VBox.prototype.willHide.call(this); |
| 188 }, | 194 }, |
| 189 | 195 |
| 190 /** | 196 /** |
| 191 * @return {!Element} | 197 * @return {!Element} |
| 192 */ | 198 */ |
| 193 toolbarContainerElement: function() | 199 toolbarContainerElement: function() |
| 194 { | 200 { |
| 195 return this._toolbarContainerElement; | 201 return this._toolbarContainerElement; |
| 196 }, | 202 }, |
| 197 | 203 |
| 198 /** | 204 /** |
| 199 * @return {!WebInspector.SearchableView} | 205 * @return {!WebInspector.SearchableView} |
| 200 */ | 206 */ |
| 201 searchableView: function() | 207 searchableView: function() |
| 202 { | 208 { |
| 203 return this._searchableView; | 209 return this._searchableView; |
| 204 }, | 210 }, |
| 205 | 211 |
| 206 /** | 212 /** |
| 207 * @return {!WebInspector.Widget} | 213 * @return {?WebInspector.Widget} |
| 208 */ | 214 */ |
| 209 visibleView: function() | 215 visibleView: function() |
| 210 { | 216 { |
| 211 return this._editorContainer.visibleView; | 217 return this._editorContainer.visibleView; |
| 212 }, | 218 }, |
| 213 | 219 |
| 214 /** | 220 /** |
| 215 * @return {?WebInspector.UISourceCodeFrame} | 221 * @return {?WebInspector.UISourceCodeFrame} |
| 216 */ | 222 */ |
| 217 currentSourceFrame: function() | 223 currentSourceFrame: function() |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 */ | 819 */ |
| 814 handleAction: function(context, actionId) | 820 handleAction: function(context, actionId) |
| 815 { | 821 { |
| 816 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); | 822 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); |
| 817 if (!sourcesView) | 823 if (!sourcesView) |
| 818 return false; | 824 return false; |
| 819 sourcesView._editorContainer.closeAllFiles(); | 825 sourcesView._editorContainer.closeAllFiles(); |
| 820 return true; | 826 return true; |
| 821 } | 827 } |
| 822 }; | 828 }; |
| OLD | NEW |