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

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

Issue 2924413002: DevTools: migrate sources navigator to shadow (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
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 * 10 *
(...skipping 13 matching lines...) Expand all
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 /** 28 /**
29 * @implements {SDK.TargetManager.Observer} 29 * @implements {SDK.TargetManager.Observer}
30 * @unrestricted 30 * @unrestricted
31 */ 31 */
32 Sources.NavigatorView = class extends UI.VBox { 32 Sources.NavigatorView = class extends UI.VBox {
33 constructor() { 33 constructor() {
34 super(); 34 super(true);
35 this.registerRequiredCSS('sources/navigatorView.css'); 35 this.registerRequiredCSS('sources/navigatorView.css');
36 36
37 this._scriptsTree = new UI.TreeOutlineInShadow(); 37 this._scriptsTree = new UI.TreeOutlineInShadow();
38 this._scriptsTree.registerRequiredCSS('sources/navigatorTree.css'); 38 this._scriptsTree.registerRequiredCSS('sources/navigatorTree.css');
39 this._scriptsTree.setComparator(Sources.NavigatorView._treeElementsCompare); 39 this._scriptsTree.setComparator(Sources.NavigatorView._treeElementsCompare);
40 this.element.appendChild(this._scriptsTree.element); 40 this.contentElement.appendChild(this._scriptsTree.element);
41 this.setDefaultFocusedElement(this._scriptsTree.element); 41 this.setDefaultFocusedElement(this._scriptsTree.element);
42 42
43 /** @type {!Multimap<!Workspace.UISourceCode, !Sources.NavigatorUISourceCode TreeNode>} */ 43 /** @type {!Multimap<!Workspace.UISourceCode, !Sources.NavigatorUISourceCode TreeNode>} */
44 this._uiSourceCodeNodes = new Multimap(); 44 this._uiSourceCodeNodes = new Multimap();
45 /** @type {!Map.<string, !Sources.NavigatorFolderTreeNode>} */ 45 /** @type {!Map.<string, !Sources.NavigatorFolderTreeNode>} */
46 this._subfolderNodes = new Map(); 46 this._subfolderNodes = new Map();
47 47
48 this._rootNode = new Sources.NavigatorRootTreeNode(this); 48 this._rootNode = new Sources.NavigatorRootTreeNode(this);
49 this._rootNode.populate(); 49 this._rootNode.populate();
50 50
51 /** @type {!Map.<!SDK.ResourceTreeFrame, !Sources.NavigatorGroupTreeNode>} * / 51 /** @type {!Map.<!SDK.ResourceTreeFrame, !Sources.NavigatorGroupTreeNode>} * /
52 this._frameNodes = new Map(); 52 this._frameNodes = new Map();
53 53
54 this.element.addEventListener('contextmenu', this.handleContextMenu.bind(thi s), false); 54 this.contentElement.addEventListener('contextmenu', this.handleContextMenu.b ind(this), false);
55 55
56 this._navigatorGroupByFolderSetting = Common.moduleSetting('navigatorGroupBy Folder'); 56 this._navigatorGroupByFolderSetting = Common.moduleSetting('navigatorGroupBy Folder');
57 this._navigatorGroupByFolderSetting.addChangeListener(this._groupingChanged. bind(this)); 57 this._navigatorGroupByFolderSetting.addChangeListener(this._groupingChanged. bind(this));
58 58
59 this._initGrouping(); 59 this._initGrouping();
60 60
61 if (Runtime.experiments.isEnabled('persistence2')) { 61 if (Runtime.experiments.isEnabled('persistence2')) {
62 Persistence.persistence.addEventListener( 62 Persistence.persistence.addEventListener(
63 Persistence.Persistence.Events.BindingCreated, this._onBindingChanged, this); 63 Persistence.Persistence.Events.BindingCreated, this._onBindingChanged, this);
64 Persistence.persistence.addEventListener( 64 Persistence.persistence.addEventListener(
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 /** 1639 /**
1640 * @param {string} title 1640 * @param {string} title
1641 * @override 1641 * @override
1642 */ 1642 */
1643 setTitle(title) { 1643 setTitle(title) {
1644 this._title = title; 1644 this._title = title;
1645 if (this._treeElement) 1645 if (this._treeElement)
1646 this._treeElement.title = this._title; 1646 this._treeElement.title = this._title;
1647 } 1647 }
1648 }; 1648 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698