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

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: A new unused variable was born 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 this._sourceSelected(uiSourceCode, true); 697 this._sourceSelected(uiSourceCode, true);
699 } 698 }
700 } 699 }
701 700
702 /** 701 /**
703 * @param {!Workspace.Project} project 702 * @param {!Workspace.Project} project
704 * @param {string} path 703 * @param {string} path
705 * @param {!Workspace.UISourceCode=} uiSourceCodeToCopy 704 * @param {!Workspace.UISourceCode=} uiSourceCodeToCopy
706 */ 705 */
707 create(project, path, uiSourceCodeToCopy) { 706 create(project, path, uiSourceCodeToCopy) {
708 var filePath;
709 var uiSourceCode;
710
711 /** 707 /**
712 * @this {Sources.NavigatorView} 708 * @this {Sources.NavigatorView}
713 * @param {?string} content 709 * @param {?string} content
714 */ 710 */
715 function contentLoaded(content) { 711 function contentLoaded(content) {
716 createFile.call(this, content || ''); 712 createFile.call(this, content || '');
717 } 713 }
718 714
719 if (uiSourceCodeToCopy) 715 if (uiSourceCodeToCopy)
720 uiSourceCodeToCopy.requestContent().then(contentLoaded.bind(this)); 716 uiSourceCodeToCopy.requestContent().then(contentLoaded.bind(this));
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 /** 1596 /**
1601 * @param {string} title 1597 * @param {string} title
1602 * @override 1598 * @override
1603 */ 1599 */
1604 setTitle(title) { 1600 setTitle(title) {
1605 this._title = title; 1601 this._title = title;
1606 if (this._treeElement) 1602 if (this._treeElement)
1607 this._treeElement.title = this._title; 1603 this._treeElement.title = this._title;
1608 } 1604 }
1609 }; 1605 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698