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

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

Issue 2580163002: DevTools: migrate navigator icons to UI.Icon (Closed)
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/navigatorTree.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
index d8fe76ba6e3e4ab80107a3dda823e143d03c9a37..89508e0f1fbb2add8b362a8e0d0568ba23741ca0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
@@ -91,7 +91,6 @@ Sources.NavigatorView = class extends UI.VBox {
var weights = {};
var types = Sources.NavigatorView.Types;
weights[types.Root] = 1;
- weights[types.Category] = 1;
weights[types.Domain] = 10;
weights[types.FileSystemFolder] = 1;
weights[types.NetworkFolder] = 1;
@@ -822,7 +821,6 @@ Sources.NavigatorView = class extends UI.VBox {
};
Sources.NavigatorView.Types = {
- Category: 'category',
Domain: 'domain',
File: 'file',
FileSystem: 'fs',
@@ -834,7 +832,6 @@ Sources.NavigatorView.Types = {
Worker: 'worker'
};
-
/**
* @unrestricted
*/
@@ -851,9 +848,16 @@ Sources.NavigatorFolderTreeElement = class extends TreeElement {
this._nodeType = type;
this.title = title;
this.tooltip = title;
- this.createIcon();
this._navigatorView = navigatorView;
this._hoverCallback = hoverCallback;
+ var iconType = 'largeicon-navigator-folder';
+ if (type === Sources.NavigatorView.Types.Domain)
+ iconType = 'largeicon-navigator-domain';
+ else if (type === Sources.NavigatorView.Types.Frame)
+ iconType = 'largeicon-navigator-frame';
+ else if (type === Sources.NavigatorView.Types.Worker)
+ iconType = 'largeicon-navigator-worker';
+ this.setLeadingIcons([UI.Icon.create(iconType, 'icon')]);
}
/**
@@ -937,7 +941,10 @@ Sources.NavigatorSourceTreeElement = class extends TreeElement {
this.listItemElement.classList.add(
'navigator-' + uiSourceCode.contentType().name() + '-tree-item', 'navigator-file-tree-item');
this.tooltip = uiSourceCode.url();
- this.createIcon();
+ var iconType = 'largeicon-navigator-file';
+ if (uiSourceCode.contentType() === Common.resourceTypes.Snippet)
+ iconType = 'largeicon-navigator-snippet';
+ this.setLeadingIcons([UI.Icon.create(iconType, 'icon')]);
this._navigatorView = navigatorView;
this._uiSourceCode = uiSourceCode;
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/navigatorTree.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698