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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/metadata_box_controller.js

Issue 2581133002: Quick View: Show year recorded metadata. (Closed)
Patch Set: . 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
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/metadata/metadata_item.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Controller of metadata box. 6 * Controller of metadata box.
7 * 7 *
8 * @param{!MetadataModel} metadataModel 8 * @param{!MetadataModel} metadataModel
9 * @param{!FilesMetadataBox} metadataBox 9 * @param{!FilesMetadataBox} metadataBox
10 * @param{!FilesQuickView} quickView 10 * @param{!FilesQuickView} quickView
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 [ 140 [
141 'ifd', 141 'ifd',
142 'imageHeight', 142 'imageHeight',
143 'imageWidth', 143 'imageWidth',
144 'mediaAlbum', 144 'mediaAlbum',
145 'mediaArtist', 145 'mediaArtist',
146 'mediaDuration', 146 'mediaDuration',
147 'mediaGenre', 147 'mediaGenre',
148 'mediaTitle', 148 'mediaTitle',
149 'mediaTrack', 149 'mediaTrack',
150 'mediaYearRecorded',
150 ]) 151 ])
151 .then(function(items) { 152 .then(function(items) {
152 var item = items[0]; 153 var item = items[0];
153 this.metadataBox_.ifd = item.ifd || null; 154 this.metadataBox_.ifd = item.ifd || null;
154 this.metadataBox_.imageHeight = item.imageHeight || 0; 155 this.metadataBox_.imageHeight = item.imageHeight || 0;
155 this.metadataBox_.imageWidth = item.imageWidth || 0; 156 this.metadataBox_.imageWidth = item.imageWidth || 0;
156 this.metadataBox_.mediaAlbum = item.mediaAlbum || ''; 157 this.metadataBox_.mediaAlbum = item.mediaAlbum || '';
157 this.metadataBox_.mediaArtist = item.mediaArtist || ''; 158 this.metadataBox_.mediaArtist = item.mediaArtist || '';
158 this.metadataBox_.mediaDuration = item.mediaDuration || 0; 159 this.metadataBox_.mediaDuration = item.mediaDuration || 0;
159 this.metadataBox_.mediaGenre = item.mediaGenre || ''; 160 this.metadataBox_.mediaGenre = item.mediaGenre || '';
160 this.metadataBox_.mediaTitle = item.mediaTitle || ''; 161 this.metadataBox_.mediaTitle = item.mediaTitle || '';
161 this.metadataBox_.mediaTrack = item.mediaTrack || 0; 162 this.metadataBox_.mediaTrack = item.mediaTrack || '';
163 this.metadataBox_.mediaYearRecorded = item.mediaYearRecorded || '';
162 }.bind(this)); 164 }.bind(this));
163 } 165 }
164 } 166 }
165 }; 167 };
166 168
167 /** 169 /**
168 * Set a current directory's size in metadata box. 170 * Set a current directory's size in metadata box.
169 * 171 *
170 * @param {!DirectoryEntry} entry 172 * @param {!DirectoryEntry} entry
171 * 173 *
(...skipping 12 matching lines...) Expand all
184 if(chrome.runtime.lastError) { 186 if(chrome.runtime.lastError) {
185 this.metadataBox_.isSizeLoading = false; 187 this.metadataBox_.isSizeLoading = false;
186 return; 188 return;
187 } 189 }
188 190
189 this.metadataBox_.isSizeLoading = false; 191 this.metadataBox_.isSizeLoading = false;
190 this.metadataBox_.size = 192 this.metadataBox_.size =
191 this.fileMetadataFormatter_.formatSize(size, true); 193 this.fileMetadataFormatter_.formatSize(size, true);
192 }.bind(this)); 194 }.bind(this));
193 }; 195 };
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/metadata/metadata_item.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698