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

Side by Side Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 310433004: Gallery.app: Update thumbnail when a file is edited on the photo editor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 6 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
« no previous file with comments | « ui/file_manager/gallery/js/ribbon.js ('k') | ui/file_manager/image_loader/request.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * Slide mode displays a single image and has a set of controls to navigate 8 * Slide mode displays a single image and has a set of controls to navigate
9 * between the images and to edit an image. 9 * between the images and to edit an image.
10 * 10 *
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 SlideMode.prototype.saveCurrentImage_ = function(callback) { 933 SlideMode.prototype.saveCurrentImage_ = function(callback) {
934 var item = this.getSelectedItem(); 934 var item = this.getSelectedItem();
935 var oldEntry = item.getEntry(); 935 var oldEntry = item.getEntry();
936 var canvas = this.imageView_.getCanvas(); 936 var canvas = this.imageView_.getCanvas();
937 937
938 this.showSpinner_(true); 938 this.showSpinner_(true);
939 var metadataEncoder = ImageEncoder.encodeMetadata( 939 var metadataEncoder = ImageEncoder.encodeMetadata(
940 this.selectedImageMetadata_.media, canvas, 1 /* quality */); 940 this.selectedImageMetadata_.media, canvas, 1 /* quality */);
941 var selectedImageMetadata = ContentProvider.ConvertContentMetadata( 941 var selectedImageMetadata = ContentProvider.ConvertContentMetadata(
942 metadataEncoder.getMetadata(), this.selectedImageMetadata_); 942 metadataEncoder.getMetadata(), this.selectedImageMetadata_);
943 if (selectedImageMetadata.filesystem)
944 selectedImageMetadata.filesystem.modificationTime = new Date();
943 this.selectedImageMetadata_ = selectedImageMetadata; 945 this.selectedImageMetadata_ = selectedImageMetadata;
944 this.metadataCache_.set(oldEntry, 946 this.metadataCache_.set(oldEntry,
945 Gallery.METADATA_TYPE, 947 Gallery.METADATA_TYPE,
946 selectedImageMetadata); 948 selectedImageMetadata);
947 949
948 item.saveToFile( 950 item.saveToFile(
949 this.context_.saveDirEntry, 951 this.context_.saveDirEntry,
950 this.shouldOverwriteOriginal_(), 952 this.shouldOverwriteOriginal_(),
951 canvas, 953 canvas,
952 metadataEncoder, 954 metadataEncoder,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 done = true; 1340 done = true;
1339 } 1341 }
1340 }.bind(this); 1342 }.bind(this);
1341 }; 1343 };
1342 1344
1343 /** 1345 /**
1344 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD 1346 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD
1345 * horizontally it's considered as a swipe gesture (change the current image). 1347 * horizontally it's considered as a swipe gesture (change the current image).
1346 */ 1348 */
1347 SwipeOverlay.SWIPE_THRESHOLD = 100; 1349 SwipeOverlay.SWIPE_THRESHOLD = 100;
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/ribbon.js ('k') | ui/file_manager/image_loader/request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698