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

Unified Diff: ui/file_manager/file_manager/common/js/util.js

Issue 823593006: Move util.loadImage and util.cancelLoadImage to thumbnail_loader.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix error function. Created 6 years 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 | ui/file_manager/file_manager/foreground/js/thumbnail_loader.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/common/js/util.js
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index 282eac03eaef752fb4bdaa801d3321b8c98aad57..b8431f1a02a1bf622e2801f3a706edeea8b392f9 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -486,37 +486,6 @@ util.AppCache.cleanup_ = function(map) {
};
/**
- * Load an image.
- *
- * @param {HTMLImageElement} image Image element.
- * @param {string} url Source url.
- * @param {Object=} opt_options Hash array of options, eg. width, height,
- * maxWidth, maxHeight, scale, cache.
- * @param {function()=} opt_isValid Function returning false iff the task
- * is not valid and should be aborted.
- * @return {?number} Task identifier or null if fetched immediately from
- * cache.
- */
-util.loadImage = function(image, url, opt_options, opt_isValid) {
- return ImageLoaderClient.loadToImage(url,
- image,
- opt_options || {},
- function() {},
- function() {
- image.onerror(new Event('load-error'));
- },
- opt_isValid);
-};
-
-/**
- * Cancels loading an image.
- * @param {number} taskId Task identifier returned by util.loadImage().
- */
-util.cancelLoadImage = function(taskId) {
- ImageLoaderClient.getInstance().cancel(taskId);
-};
-
-/**
* Returns true if the board of the device matches the given prefix.
* @param {string} boardPrefix The board prefix to match against.
* (ex. "x86-mario". Prefix is used as the actual board name comes with
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/thumbnail_loader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698