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

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

Issue 809803006: Gallery: Add debugMe method to Gallery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/gallery.js ('k') | ui/file_manager/gallery/js/mosaic_mode_unittest.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/mosaic_mode.js
diff --git a/ui/file_manager/gallery/js/mosaic_mode.js b/ui/file_manager/gallery/js/mosaic_mode.js
index 930eea83e1077fc4d0f6c36a2c6242cde1a21eaa..0bcb3cd1dbc714ff9aed8ec922f5a758707ced20 100644
--- a/ui/file_manager/gallery/js/mosaic_mode.js
+++ b/ui/file_manager/gallery/js/mosaic_mode.js
@@ -68,6 +68,13 @@ MosaicMode.prototype.onKeyDown = function(event) {
this.mosaic_.onKeyDown(event);
};
+/**
+ * Enters the debug mode.
+ */
+MosaicMode.prototype.debugMe = function() {
+ this.mosaic_.debugMe();
+};
+
////////////////////////////////////////////////////////////////////////////////
/**
@@ -733,6 +740,13 @@ Mosaic.prototype.getItemCount_ = function() {
return this.dataModel_.length;
};
+/**
+ * Enters the debug me.
+ */
+Mosaic.prototype.debugMe = function() {
+ this.classList.add('debug-me');
+};
+
////////////////////////////////////////////////////////////////////////////////
/**
@@ -2138,8 +2152,25 @@ Mosaic.Tile.prototype.load = function(loadMode, onImageLoaded) {
else
this.wrapper_.classList.remove('animated');
}
+
+ // Add debug mode classes.
+ this.wrapper_.classList.remove('load-target-content-metadata');
+ this.wrapper_.classList.remove('load-target-external-metadata');
+ this.wrapper_.classList.remove('load-target-file-entry');
+ switch (loader.getLoadTarget()) {
+ case ThumbnailLoader.LoadTarget.CONTENT_METADATA:
+ this.wrapper_.classList.add('load-target-content-metadata');
+ break;
+ case ThumbnailLoader.LoadTarget.EXTERNAL_METADATA:
+ this.wrapper_.classList.add('load-target-external-metadata');
+ break;
+ case ThumbnailLoader.LoadTarget.FILE_ENTRY:
+ this.wrapper_.classList.add('load-target-file-entry');
+ break;
+ }
loader.attachImage(this.wrapper_, ThumbnailLoader.FillMode.OVER_FILL);
onImageLoaded(success);
+
switch (mode) {
case Mosaic.Tile.LoadMode.LOW_DPI:
this.imagePreloading_ = false;
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/mosaic_mode_unittest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698