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

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

Issue 420743002: Gallery: Store image caches in Gallery items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | 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 79e7cefe4bb98da4323172d2097795be63f326de..76a5b7d4a34a7ec922139ff6132e0e893cc78b3b 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -37,7 +37,6 @@ function SlideMode(container, content, toolbar, prompt,
this.onSelectionBound_ = this.onSelection_.bind(this);
this.onSpliceBound_ = this.onSplice_.bind(this);
- this.onContentBound_ = this.onContentChange_.bind(this);
// Unique numeric key, incremented per each load attempt used to discard
// old attempts. This can happen especially when changing selection fast or
@@ -256,7 +255,6 @@ SlideMode.prototype.enter = function(
this.selectionModel_.addEventListener('change', this.onSelectionBound_);
this.dataModel_.addEventListener('splice', this.onSpliceBound_);
- this.dataModel_.addEventListener('content', this.onContentBound_);
ImageUtil.setAttribute(this.arrowBox_, 'active', this.getItemCount_() > 1);
this.ribbon_.enable();
@@ -314,7 +312,6 @@ SlideMode.prototype.enter = function(
// Register handlers.
this.selectionModel_.addEventListener('change', this.onSelectionBound_);
this.dataModel_.addEventListener('splice', this.onSpliceBound_);
- this.dataModel_.addEventListener('content', this.onContentBound_);
this.touchHandlers_.enabled = true;
// Wait 1000ms after the animation is done, then prefetch the next image.
@@ -342,7 +339,6 @@ SlideMode.prototype.leave = function(zoomToRect, callback) {
this.selectionModel_.removeEventListener(
'change', this.onSelectionBound_);
this.dataModel_.removeEventListener('splice', this.onSpliceBound_);
- this.dataModel_.removeEventListener('content', this.onContentBound_);
this.ribbon_.disable();
this.active_ = false;
if (this.savedSelection_)
@@ -996,17 +992,6 @@ SlideMode.prototype.saveCurrentImage_ = function(callback) {
};
/**
- * Update caches when the selected item has been renamed.
- * @param {Event} event Event.
- * @private
- */
-SlideMode.prototype.onContentChange_ = function(event) {
- var newEntry = event.item.getEntry();
- if (!util.isSameEntry(newEntry, event.oldEntry))
- this.imageView_.changeEntry(newEntry);
-};
-
-/**
* Flash 'Saved' label briefly to indicate that the image has been saved.
* @private
*/
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698