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

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

Issue 2384783003: DevTools: split Sources tree into Network and Filesystem trees. (Closed)
Patch Set: review comments addressed 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const initialNavigatorWidth = 225; 60 const initialNavigatorWidth = 225;
61 this.editorView = new WebInspector.SplitWidget(true, false, "sourcesPanelNav igatorSplitViewState", initialNavigatorWidth); 61 this.editorView = new WebInspector.SplitWidget(true, false, "sourcesPanelNav igatorSplitViewState", initialNavigatorWidth);
62 this.editorView.enableShowModeSaving(); 62 this.editorView.enableShowModeSaving();
63 this.editorView.element.tabIndex = 0; 63 this.editorView.element.tabIndex = 0;
64 this._splitWidget.setMainWidget(this.editorView); 64 this._splitWidget.setMainWidget(this.editorView);
65 65
66 // Create navigator tabbed pane with toolbar. 66 // Create navigator tabbed pane with toolbar.
67 this._navigatorTabbedLocation = WebInspector.viewManager.createTabbedLocatio n(this._revealNavigatorSidebar.bind(this), "navigator-view", true); 67 this._navigatorTabbedLocation = WebInspector.viewManager.createTabbedLocatio n(this._revealNavigatorSidebar.bind(this), "navigator-view", true);
68 var tabbedPane = this._navigatorTabbedLocation.tabbedPane(); 68 var tabbedPane = this._navigatorTabbedLocation.tabbedPane();
69 tabbedPane.setMinimumSize(100, 25); 69 tabbedPane.setMinimumSize(100, 25);
70 tabbedPane.setShrinkableTabs(true);
71 tabbedPane.element.classList.add("navigator-tabbed-pane"); 70 tabbedPane.element.classList.add("navigator-tabbed-pane");
72 var navigatorMenuButton = new WebInspector.ToolbarMenuButton(this._populateN avigatorMenu.bind(this), true); 71 var navigatorMenuButton = new WebInspector.ToolbarMenuButton(this._populateN avigatorMenu.bind(this), true);
73 navigatorMenuButton.setTitle(WebInspector.UIString("More options")); 72 navigatorMenuButton.setTitle(WebInspector.UIString("More options"));
74 tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton); 73 tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton);
75 this.editorView.setSidebarWidget(tabbedPane); 74 this.editorView.setSidebarWidget(tabbedPane);
76 75
77 this._sourcesView = new WebInspector.SourcesView(); 76 this._sourcesView = new WebInspector.SourcesView();
78 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel ected, this._editorSelected.bind(this)); 77 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel ected, this._editorSelected.bind(this));
79 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo sed, this._editorClosed.bind(this)); 78 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo sed, this._editorClosed.bind(this));
80 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this)); 79 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this));
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 { 351 {
353 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus); 352 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus);
354 }, 353 },
355 354
356 /** 355 /**
357 * @param {!WebInspector.UISourceCode} uiSourceCode 356 * @param {!WebInspector.UISourceCode} uiSourceCode
358 * @param {boolean=} skipReveal 357 * @param {boolean=} skipReveal
359 */ 358 */
360 _revealInNavigator: function(uiSourceCode, skipReveal) 359 _revealInNavigator: function(uiSourceCode, skipReveal)
361 { 360 {
361 var binding = WebInspector.persistence.binding(uiSourceCode);
362 if (binding && binding.network === uiSourceCode)
363 uiSourceCode = binding.fileSystem;
364
362 var extensions = self.runtime.extensions(WebInspector.NavigatorView); 365 var extensions = self.runtime.extensions(WebInspector.NavigatorView);
363 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators.bind(this)); 366 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators.bind(this));
364 367
365 /** 368 /**
366 * @this {WebInspector.SourcesPanel} 369 * @this {WebInspector.SourcesPanel}
367 * @param {!Array.<!Object>} objects 370 * @param {!Array.<!Object>} objects
368 */ 371 */
369 function filterNavigators(objects) 372 function filterNavigators(objects)
370 { 373 {
371 for (var i = 0; i < objects.length; ++i) { 374 for (var i = 0; i < objects.length; ++i) {
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 __proto__: WebInspector.VBox.prototype 1373 __proto__: WebInspector.VBox.prototype
1371 } 1374 }
1372 1375
1373 /** 1376 /**
1374 * @return {boolean} 1377 * @return {boolean}
1375 */ 1378 */
1376 WebInspector.SourcesPanel.WrapperView.isShowing = function() 1379 WebInspector.SourcesPanel.WrapperView.isShowing = function()
1377 { 1380 {
1378 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); 1381 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing();
1379 } 1382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698