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

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 435183002: Gallery.app: Bind the target item to the save function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index 0b7ea515bd69218530978af73f1f55edb026f411..ca348d57ae04cb88a595709b4ed2141d4a6c403a 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -750,7 +750,11 @@ SlideMode.prototype.loadItem_ = function(
}.bind(this);
this.editor_.openSession(
- item, effect, this.saveCurrentImage_.bind(this), displayDone, loadDone);
+ item,
+ effect,
+ this.saveCurrentImage_.bind(this, item),
+ displayDone,
+ loadDone);
};
/**
@@ -954,13 +958,13 @@ SlideMode.prototype.updateThumbnails = function() {
/**
* Save the current image to a file.
*
+ * @param {Gallery.Item} item Item to save the image.
* @param {function} callback Callback.
* @private
*/
-SlideMode.prototype.saveCurrentImage_ = function(callback) {
+SlideMode.prototype.saveCurrentImage_ = function(item, callback) {
this.showSpinner_(true);
- var item = this.getSelectedItem();
var savedPromise = this.dataModel_.saveItem(
item,
this.imageView_.getCanvas(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698