Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: test fixed Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 var unsavedSourceCodes = []; 68 var unsavedSourceCodes = [];
69 var projects = WebInspector.workspace.projectsForType(WebInspector.proje ctTypes.FileSystem); 69 var projects = WebInspector.workspace.projectsForType(WebInspector.proje ctTypes.FileSystem);
70 for (var i = 0; i < projects.length; ++i) 70 for (var i = 0; i < projects.length; ++i)
71 unsavedSourceCodes = unsavedSourceCodes.concat(projects[i].uiSourceC odes().filter(isUnsaved)); 71 unsavedSourceCodes = unsavedSourceCodes.concat(projects[i].uiSourceC odes().filter(isUnsaved));
72 72
73 if (!unsavedSourceCodes.length) 73 if (!unsavedSourceCodes.length)
74 return; 74 return;
75 75
76 event.returnValue = WebInspector.UIString("DevTools have unsaved changes that will be permanently lost."); 76 event.returnValue = WebInspector.UIString("DevTools have unsaved changes that will be permanently lost.");
77 WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.ins tance()); 77 WebInspector.viewManager.showView("sources");
78 for (var i = 0; i < unsavedSourceCodes.length; ++i) 78 for (var i = 0; i < unsavedSourceCodes.length; ++i)
79 WebInspector.Revealer.reveal(unsavedSourceCodes[i]); 79 WebInspector.Revealer.reveal(unsavedSourceCodes[i]);
80 80
81 /** 81 /**
82 * @param {!WebInspector.UISourceCode} sourceCode 82 * @param {!WebInspector.UISourceCode} sourceCode
83 * @return {boolean} 83 * @return {boolean}
84 */ 84 */
85 function isUnsaved(sourceCode) 85 function isUnsaved(sourceCode)
86 { 86 {
87 var binding = WebInspector.persistence.binding(sourceCode); 87 var binding = WebInspector.persistence.binding(sourceCode);
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 */ 803 */
804 handleAction: function(context, actionId) 804 handleAction: function(context, actionId)
805 { 805 {
806 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); 806 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView);
807 if (!sourcesView) 807 if (!sourcesView)
808 return false; 808 return false;
809 sourcesView._editorContainer.closeAllFiles(); 809 sourcesView._editorContainer.closeAllFiles();
810 return true; 810 return true;
811 } 811 }
812 } 812 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698