Chromium Code Reviews| 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); |