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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: Created 4 years 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) 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 /** 151 /**
152 * @param {!TreeElement} treeElement1 152 * @param {!TreeElement} treeElement1
153 * @param {!TreeElement} treeElement2 153 * @param {!TreeElement} treeElement2
154 * @return {number} 154 * @return {number}
155 */ 155 */
156 static _treeElementsCompare(treeElement1, treeElement2) { 156 static _treeElementsCompare(treeElement1, treeElement2) {
157 var typeWeight1 = Sources.NavigatorView._treeElementOrder(treeElement1); 157 var typeWeight1 = Sources.NavigatorView._treeElementOrder(treeElement1);
158 var typeWeight2 = Sources.NavigatorView._treeElementOrder(treeElement2); 158 var typeWeight2 = Sources.NavigatorView._treeElementOrder(treeElement2);
159 159
160 var result;
161 if (typeWeight1 > typeWeight2) 160 if (typeWeight1 > typeWeight2)
162 return 1; 161 return 1;
163 if (typeWeight1 < typeWeight2) 162 if (typeWeight1 < typeWeight2)
164 return -1; 163 return -1;
165 return treeElement1.titleAsText().compareTo(treeElement2.titleAsText()); 164 return treeElement1.titleAsText().compareTo(treeElement2.titleAsText());
166 } 165 }
167 166
168 /** 167 /**
169 * @param {!Common.Event} event 168 * @param {!Common.Event} event
170 */ 169 */
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 this._sourceSelected(uiSourceCode, true); 682 this._sourceSelected(uiSourceCode, true);
684 } 683 }
685 } 684 }
686 685
687 /** 686 /**
688 * @param {!Workspace.Project} project 687 * @param {!Workspace.Project} project
689 * @param {string} path 688 * @param {string} path
690 * @param {!Workspace.UISourceCode=} uiSourceCodeToCopy 689 * @param {!Workspace.UISourceCode=} uiSourceCodeToCopy
691 */ 690 */
692 create(project, path, uiSourceCodeToCopy) { 691 create(project, path, uiSourceCodeToCopy) {
693 var filePath;
694 var uiSourceCode;
695
696 /** 692 /**
697 * @this {Sources.NavigatorView} 693 * @this {Sources.NavigatorView}
698 * @param {?string} content 694 * @param {?string} content
699 */ 695 */
700 function contentLoaded(content) { 696 function contentLoaded(content) {
701 createFile.call(this, content || ''); 697 createFile.call(this, content || '');
702 } 698 }
703 699
704 if (uiSourceCodeToCopy) 700 if (uiSourceCodeToCopy)
705 uiSourceCodeToCopy.requestContent().then(contentLoaded.bind(this)); 701 uiSourceCodeToCopy.requestContent().then(contentLoaded.bind(this));
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 /** 1590 /**
1595 * @param {string} title 1591 * @param {string} title
1596 * @override 1592 * @override
1597 */ 1593 */
1598 setTitle(title) { 1594 setTitle(title) {
1599 this._title = title; 1595 this._title = title;
1600 if (this._treeElement) 1596 if (this._treeElement)
1601 this._treeElement.title = this._title; 1597 this._treeElement.title = this._title;
1602 } 1598 }
1603 }; 1599 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698