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

Side by Side Diff: chrome/browser/resources/file_manager/foreground/js/media/video_player.js

Issue 130663002: Get rid of fullPath in the metadata cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Display error message. 8 * Display error message.
9 * @param {string} message Message id. 9 * @param {string} message Message id.
10 */ 10 */
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 document.ondragstart = function(e) { e.preventDefault() }; 134 document.ondragstart = function(e) { e.preventDefault() };
135 135
136 chrome.fileBrowserPrivate.getStrings(function(strings) { 136 chrome.fileBrowserPrivate.getStrings(function(strings) {
137 loadTimeData.data = strings; 137 loadTimeData.data = strings;
138 138
139 controls = new FullWindowVideoControls( 139 controls = new FullWindowVideoControls(
140 document.querySelector('#video-player'), 140 document.querySelector('#video-player'),
141 document.querySelector('#video-container'), 141 document.querySelector('#video-container'),
142 document.querySelector('#controls')); 142 document.querySelector('#controls'));
143 143
144 metadataCache = MetadataCache.createFull();
145 volumeManager = new VolumeManagerWrapper( 144 volumeManager = new VolumeManagerWrapper(
146 VolumeManagerWrapper.DriveEnabledStatus.DRIVE_ENABLED); 145 VolumeManagerWrapper.DriveEnabledStatus.DRIVE_ENABLED);
147 volumeManager.addEventListener('externally-unmounted', 146 volumeManager.addEventListener('externally-unmounted',
148 onExternallyUnmounted); 147 onExternallyUnmounted);
148 metadataCache = MetadataCache.createFull(volumeManager);
149 149
150 // If the video player is starting before the first instance of the File 150 // If the video player is starting before the first instance of the File
151 // Manager then it does not have access to filesystem URLs. 151 // Manager then it does not have access to filesystem URLs.
152 // Request it now. 152 // Request it now.
153 volumeManager.ensureInitialized(reload); 153 volumeManager.ensureInitialized(reload);
154 var reloadVideo = function(e) { 154 var reloadVideo = function(e) {
155 if (decodeErrorOccured && 155 if (decodeErrorOccured &&
156 // Ignore shortcut keys 156 // Ignore shortcut keys
157 !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { 157 !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
158 reload(); 158 reload();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 appWindow.resizeTo(newWidth, newHeight); 280 appWindow.resizeTo(newWidth, newHeight);
281 appWindow.moveTo(oldLeft - (newWidth - oldWidth) / 2, 281 appWindow.moveTo(oldLeft - (newWidth - oldWidth) / 2,
282 oldTop - (newHeight - oldHeight) / 2); 282 oldTop - (newHeight - oldHeight) / 2);
283 appWindow.show(); 283 appWindow.show();
284 }); 284 });
285 }); 285 });
286 }); 286 });
287 } 287 }
288 288
289 util.addPageLoadHandler(loadVideoPlayer); 289 util.addPageLoadHandler(loadVideoPlayer);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698