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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/location_line.js

Issue 873703003: Update the visual design of Files.app's toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/ui/location_line.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/location_line.js b/ui/file_manager/file_manager/foreground/js/ui/location_line.js
index 9f94dd927ab4ad57ffc95b68c3ed1e5ec8973cd4..da18cc00775edf72938ac4d582891b4127f0b87f 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/location_line.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/location_line.js
@@ -7,14 +7,12 @@
* class.
* @extends {cr.EventTarget}
* @param {!Element} breadcrumbs Container element for breadcrumbs.
- * @param {!Element} volumeIcon Volume icon.
* @param {!MetadataCache} metadataCache To retrieve metadata.
* @param {!VolumeManagerWrapper} volumeManager Volume manager.
* @constructor
*/
-function LocationLine(breadcrumbs, volumeIcon, metadataCache, volumeManager) {
+function LocationLine(breadcrumbs, metadataCache, volumeManager) {
this.breadcrumbs_ = breadcrumbs;
- this.volumeIcon_ = volumeIcon;
this.metadataCache_ = metadataCache;
this.volumeManager_ = volumeManager;
this.entry_ = null;
@@ -47,31 +45,6 @@ LocationLine.prototype.show = function(entry) {
this.entry_ = entry;
this.showSequence_++;
- // Clear the background image for the icon and the sub type (if any).
- this.volumeIcon_.removeAttribute('style');
- this.volumeIcon_.removeAttribute('volume-subtype');
-
- // Updates volume icon.
- var locationInfo = this.volumeManager_.getLocationInfo(entry);
- if (locationInfo && locationInfo.rootType && locationInfo.isRootEntry) {
- if (locationInfo.volumeInfo.volumeType ===
- VolumeManagerCommon.VolumeType.PROVIDED) {
- var extensionId = locationInfo.volumeInfo.extensionId;
- var backgroundImage = '-webkit-image-set(' +
- 'url(chrome://extension-icon/' + extensionId + '/16/1) 1x, ' +
- 'url(chrome://extension-icon/' + extensionId + '/32/1) 2x);';
- this.volumeIcon_.setAttribute(
- 'style', 'background-image: ' + backgroundImage);
- }
- this.volumeIcon_.setAttribute(
- 'volume-type-icon', locationInfo.rootType);
- } else {
- this.volumeIcon_.setAttribute(
- 'volume-type-icon', locationInfo.volumeInfo.volumeType);
- this.volumeIcon_.setAttribute(
- 'volume-subtype', locationInfo.volumeInfo.deviceType || '');
- }
-
var queue = new AsyncUtil.Queue();
var entries = [];
var error = false;
@@ -177,7 +150,8 @@ LocationLine.prototype.updateInternal_ = function(entries) {
}
// Add a separator.
- var separator = doc.createElement('div');
+ var separator = doc.createElement('core-icon');
+ separator.setAttribute('icon', 'chevron-right');
separator.className = 'separator';
this.breadcrumbs_.appendChild(separator);
}
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698