Chromium Code Reviews| 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 { | 70 { |
| 71 if (event.returnValue) | 71 if (event.returnValue) |
| 72 return; | 72 return; |
| 73 var unsavedSourceCodes = WebInspector.workspace.unsavedSourceCodes(); | 73 var unsavedSourceCodes = WebInspector.workspace.unsavedSourceCodes(); |
| 74 if (!unsavedSourceCodes.length) | 74 if (!unsavedSourceCodes.length) |
| 75 return; | 75 return; |
| 76 | 76 |
| 77 event.returnValue = WebInspector.UIString("DevTools have unsaved changes that will be permanently lost."); | 77 event.returnValue = WebInspector.UIString("DevTools have unsaved changes that will be permanently lost."); |
| 78 WebInspector.inspectorView.showPanel("sources"); | 78 WebInspector.inspectorView.showPanel("sources"); |
| 79 for (var i = 0; i < unsavedSourceCodes.length; ++i) | 79 for (var i = 0; i < unsavedSourceCodes.length; ++i) |
| 80 WebInspector.panels.sources.showUISourceCode(unsavedSourceCodes[i]); | 80 WebInspector.inspectorView.panel("sources").showUISourceCode(unsaved SourceCodes[i]); |
|
pfeldman
2014/05/06 19:57:14
You should plumb delegates instead.
apavlov
2014/05/07 10:26:13
Agree. My point was to do mechanical changes first
| |
| 81 } | 81 } |
| 82 window.addEventListener("beforeunload", handleBeforeUnload, true); | 82 window.addEventListener("beforeunload", handleBeforeUnload, true); |
| 83 | 83 |
| 84 this._shortcuts = {}; | 84 this._shortcuts = {}; |
| 85 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se); | 85 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se); |
| 86 } | 86 } |
| 87 | 87 |
| 88 WebInspector.SourcesView.Events = { | 88 WebInspector.SourcesView.Events = { |
| 89 EditorClosed: "EditorClosed", | 89 EditorClosed: "EditorClosed", |
| 90 EditorSelected: "EditorSelected", | 90 EditorSelected: "EditorSelected", |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 { | 699 { |
| 700 } | 700 } |
| 701 | 701 |
| 702 WebInspector.SourcesView.EditorAction.prototype = { | 702 WebInspector.SourcesView.EditorAction.prototype = { |
| 703 /** | 703 /** |
| 704 * @param {!WebInspector.SourcesView} sourcesView | 704 * @param {!WebInspector.SourcesView} sourcesView |
| 705 * @return {!Element} | 705 * @return {!Element} |
| 706 */ | 706 */ |
| 707 button: function(sourcesView) { } | 707 button: function(sourcesView) { } |
| 708 } | 708 } |
| OLD | NEW |