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

Unified Diff: ui/file_manager/file_manager/background/js/volume_manager_util.js

Issue 2622133008: mediaview: Implement UI. (Closed)
Patch Set: Fix typo and add logging. Created 3 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/background/js/volume_manager_util.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_util.js b/ui/file_manager/file_manager/background/js/volume_manager_util.js
index ec6abc25bd2c21726506e2ba62b7effee6481937..a02ce6a989773d8f3a6efd9a5ff9c86a616af472 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager_util.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager_util.js
@@ -63,6 +63,20 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata) {
case VolumeManagerCommon.VolumeType.DRIVE:
localizedLabel = str('DRIVE_DIRECTORY_LABEL');
break;
+ case VolumeManagerCommon.VolumeType.MEDIA_VIEW:
+ switch (VolumeManagerCommon.getMediaViewRootTypeFromVolumeId(
+ volumeMetadata.volumeId)) {
+ case VolumeManagerCommon.MediaViewRootType.IMAGES:
+ localizedLabel = str('MEDIA_VIEW_IMAGES_ROOT_LABEL');
+ break;
+ case VolumeManagerCommon.MediaViewRootType.VIDEOS:
+ localizedLabel = str('MEDIA_VIEW_VIDEOS_ROOT_LABEL');
+ break;
+ case VolumeManagerCommon.MediaViewRootType.AUDIO:
+ localizedLabel = str('MEDIA_VIEW_AUDIO_ROOT_LABEL');
+ break;
+ }
+ break;
default:
// TODO(mtomasz): Calculate volumeLabel for all types of volumes in the
// C++ layer.
« no previous file with comments | « ui/file_manager/file_manager/background/js/volume_manager_impl.js ('k') | ui/file_manager/file_manager/common/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698