| 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 * @implements {Sources.TabbedEditorContainerDelegate} | 5 * @implements {Sources.TabbedEditorContainerDelegate} |
| 6 * @implements {UI.Searchable} | 6 * @implements {UI.Searchable} |
| 7 * @implements {UI.Replaceable} | 7 * @implements {UI.Replaceable} |
| 8 * @unrestricted | 8 * @unrestricted |
| 9 */ | 9 */ |
| 10 Sources.SourcesView = class extends UI.VBox { | 10 Sources.SourcesView = class extends UI.VBox { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 */ | 246 */ |
| 247 _uiSourceCodeAdded(event) { | 247 _uiSourceCodeAdded(event) { |
| 248 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 248 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 249 this._addUISourceCode(uiSourceCode); | 249 this._addUISourceCode(uiSourceCode); |
| 250 } | 250 } |
| 251 | 251 |
| 252 /** | 252 /** |
| 253 * @param {!Workspace.UISourceCode} uiSourceCode | 253 * @param {!Workspace.UISourceCode} uiSourceCode |
| 254 */ | 254 */ |
| 255 _addUISourceCode(uiSourceCode) { | 255 _addUISourceCode(uiSourceCode) { |
| 256 if (uiSourceCode.isFromServiceProject()) | 256 if (uiSourceCode.project().isServiceProject()) |
| 257 return; | 257 return; |
| 258 this._editorContainer.addUISourceCode(uiSourceCode); | 258 this._editorContainer.addUISourceCode(uiSourceCode); |
| 259 } | 259 } |
| 260 | 260 |
| 261 _uiSourceCodeRemoved(event) { | 261 _uiSourceCodeRemoved(event) { |
| 262 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 262 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 263 this._removeUISourceCodes([uiSourceCode]); | 263 this._removeUISourceCodes([uiSourceCode]); |
| 264 } | 264 } |
| 265 | 265 |
| 266 /** | 266 /** |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 * @return {boolean} | 752 * @return {boolean} |
| 753 */ | 753 */ |
| 754 handleAction(context, actionId) { | 754 handleAction(context, actionId) { |
| 755 var sourcesView = UI.context.flavor(Sources.SourcesView); | 755 var sourcesView = UI.context.flavor(Sources.SourcesView); |
| 756 if (!sourcesView) | 756 if (!sourcesView) |
| 757 return false; | 757 return false; |
| 758 sourcesView._editorContainer.closeAllFiles(); | 758 sourcesView._editorContainer.closeAllFiles(); |
| 759 return true; | 759 return true; |
| 760 } | 760 } |
| 761 }; | 761 }; |
| OLD | NEW |