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

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

Issue 10399047: [Photo Editor] Save edited images immediately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a spinner cursor Created 8 years, 7 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 | « chrome/browser/resources/file_manager/js/image_editor/image_editor.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25eae98b3330453d4acc810063eeae50137f3166..70b1dfc9cfcdcd7ede3d441f11d8a97072e00206 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
@@ -122,6 +122,10 @@ ImageView.prototype.getVideo = function() { return this.videoElement_ };
ImageView.prototype.getThumbnail = function() { return this.thumbnailCanvas_ };
+ImageView.prototype.getContentRevision = function() {
+ return this.contentRevision_;
+};
+
/**
* Copy an image fragment from a full resolution canvas to a device resolution
* canvas.
@@ -219,6 +223,7 @@ ImageView.prototype.load = function(
var self = this;
this.contentID_ = id;
+ this.contentRevision_ = -1;
var loadingVideo = FileType.getMediaType(source) == 'video';
if (loadingVideo) {
@@ -370,9 +375,8 @@ ImageView.prototype.getReadyContent = function(id, source) {
*
* @param {number} id Unique image id for caching purposes
* @param {string|HTMLCanvasElement} source
- * @param {Object} metadata
*/
-ImageView.prototype.prefetch = function(id, source, metadata) {
+ImageView.prototype.prefetch = function(id, source) {
var self = this;
function prefetchDone(canvas) {
if (canvas.width)
@@ -437,6 +441,7 @@ ImageView.prototype.replaceContent_ = function(
// Once we implement zoom/pan we should pass contentCanvas_ instead.
this.updateThumbnail_(this.screenImage_);
+ this.contentRevision_++;
for (var i = 0; i != this.contentCallbacks_.length; i++) {
try {
this.contentCallbacks_[i]();
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/image_editor.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698