| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |