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

Unified Diff: ui/file_manager/file_manager/common/js/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/common/js/util.js
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index f5a0455729d33f3a55142f9127cdaa790a276f56..d7b0b83403ee0263ef7c8d6cf4bd9789c1180a19 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -940,6 +940,20 @@ util.getRootTypeLabel = function(locationInfo) {
return str('DRIVE_SHARED_WITH_ME_COLLECTION_LABEL');
case VolumeManagerCommon.RootType.DRIVE_RECENT:
return str('DRIVE_RECENT_COLLECTION_LABEL');
+ case VolumeManagerCommon.RootType.MEDIA_VIEW:
+ var mediaViewRootType =
+ VolumeManagerCommon.getMediaViewRootTypeFromVolumeId(
+ locationInfo.volumeInfo.volumeId);
+ switch (mediaViewRootType) {
+ case VolumeManagerCommon.MediaViewRootType.IMAGES:
+ return str('MEDIA_VIEW_IMAGES_ROOT_LABEL');
+ case VolumeManagerCommon.MediaViewRootType.VIDEOS:
+ return str('MEDIA_VIEW_VIDEOS_ROOT_LABEL');
+ case VolumeManagerCommon.MediaViewRootType.AUDIO:
+ return str('MEDIA_VIEW_AUDIO_ROOT_LABEL');
+ }
+ console.error('Unsupported media view root type: ' + mediaViewRootType);
+ return locationInfo.volumeInfo.label;
case VolumeManagerCommon.RootType.DRIVE_OTHER:
case VolumeManagerCommon.RootType.ARCHIVE:
case VolumeManagerCommon.RootType.REMOVABLE:

Powered by Google App Engine
This is Rietveld 408576698