| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 { | 473 { |
| 474 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data
.currentFile); | 474 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data
.currentFile); |
| 475 var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode
&& event.data.userGesture; | 475 var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode
&& event.data.userGesture; |
| 476 if (shouldUseHistoryManager) | 476 if (shouldUseHistoryManager) |
| 477 this._historyManager.updateCurrentState(); | 477 this._historyManager.updateCurrentState(); |
| 478 var sourceFrame = this._showFile(uiSourceCode); | 478 var sourceFrame = this._showFile(uiSourceCode); |
| 479 if (shouldUseHistoryManager) | 479 if (shouldUseHistoryManager) |
| 480 this._historyManager.pushNewState(); | 480 this._historyManager.pushNewState(); |
| 481 | 481 |
| 482 this._searchableView.setReplaceable(!!sourceFrame && sourceFrame.canEdit
Source()); | 482 this._searchableView.setReplaceable(!!sourceFrame && sourceFrame.canEdit
Source()); |
| 483 this._searchableView.resetSearch(); | 483 this._searchableView.refreshSearch(); |
| 484 | 484 |
| 485 this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSele
cted, uiSourceCode); | 485 this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSele
cted, uiSourceCode); |
| 486 }, | 486 }, |
| 487 | 487 |
| 488 /** | 488 /** |
| 489 * @param {!WebInspector.UISourceCode} uiSourceCode | 489 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 490 */ | 490 */ |
| 491 sourceRenamed: function(uiSourceCode) | 491 sourceRenamed: function(uiSourceCode) |
| 492 { | 492 { |
| 493 this._recreateSourceFrameIfNeeded(uiSourceCode); | 493 this._recreateSourceFrameIfNeeded(uiSourceCode); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 var currentUISourceCode = sourcesView.currentUISourceCode(); | 802 var currentUISourceCode = sourcesView.currentUISourceCode(); |
| 803 if (!currentUISourceCode) | 803 if (!currentUISourceCode) |
| 804 return true; | 804 return true; |
| 805 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); | 805 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); |
| 806 if (!nextUISourceCode) | 806 if (!nextUISourceCode) |
| 807 return true; | 807 return true; |
| 808 sourcesView.showSourceLocation(nextUISourceCode); | 808 sourcesView.showSourceLocation(nextUISourceCode); |
| 809 return true; | 809 return true; |
| 810 } | 810 } |
| 811 } | 811 } |
| OLD | NEW |