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

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/image_view.js

Issue 9664045: [File Manager] Use content url for playing media files from a gdata directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Permissions Created 8 years, 9 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: chrome/browser/resources/file_manager/js/image_editor/image_view.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_view.js b/chrome/browser/resources/file_manager/js/image_editor/image_view.js
index 83ddfdccc99e9df206bab8b832c0fedb6f85fcc0..2aeeac336969856cc1d31176879b6e3d89bdc127 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_view.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_view.js
@@ -180,10 +180,8 @@ ImageView.prototype.load = function(
if (metadata.thumbnailURL) {
video.setAttribute('poster', metadata.thumbnailURL);
}
- if (!metadata.thumbnailOnly) {
- video.src = source;
- video.load();
- }
+ video.src = metadata.contentURL || source;
+ video.load();
displayMainImage(ImageView.LOAD_TYPE_TOTAL, video);
return;
}
@@ -222,18 +220,17 @@ ImageView.prototype.load = function(
}
self.lastLoadTime_ = time;
- if (metadata.thumbnailOnly) {
+ if (metadata.contentURL) {
+ source = metadata.contentURL;
dgozman 2012/03/11 13:17:41 Where is |source| defined and used?
Vladislav Kaznacheev 2012/03/11 14:09:53 This is a parameter, and yes, this is ugly. I refa
// We do not know the main image size, but chances are that it is large
// enough. Show the thumbnail at the maximum possible scale.
var bounds = self.viewport_.getScreenBounds();
var scale = Math.min (bounds.width / canvas.width,
bounds.height / canvas.height);
self.replace(canvas, slide, canvas.width * scale, canvas.height * scale);
- if (opt_callback) opt_callback(ImageView.LOAD_TYPE_TOTAL);
- return;
+ } else {
+ self.replace(canvas, slide, metadata.width, metadata.height);
}
-
- self.replace(canvas, slide, metadata.width, metadata.height);
if (!slide) mainImageLoadDelay = 0;
slide = 0;
loadMainImage(loadType, mainImageLoadDelay);

Powered by Google App Engine
This is Rietveld 408576698