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

Unified Diff: ui/file_manager/gallery/js/image_editor/image_view.js

Issue 382143004: Remove repaint callbacks from Viewport. (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
Index: ui/file_manager/gallery/js/image_editor/image_view.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_view.js b/ui/file_manager/gallery/js/image_editor/image_view.js
index ea6080f0943db01afbf0f813bb5b459947c832fd..73d8ae54018c5044b42fd4520aa4c07ba96061ae 100644
--- a/ui/file_manager/gallery/js/image_editor/image_view.js
+++ b/ui/file_manager/gallery/js/image_editor/image_view.js
@@ -10,8 +10,11 @@
* @param {HTMLElement} container The container element.
* @param {Viewport} viewport The viewport.
* @constructor
+ * @extends {ImageBuffer.Overlay}
*/
function ImageView(container, viewport) {
+ ImageBuffer.Overlay.call(this);
+
this.container_ = container;
this.viewport_ = viewport;
this.document_ = container.ownerDocument;
@@ -89,15 +92,15 @@ ImageView.LOAD_TYPE_TOTAL = 5;
ImageView.prototype = {__proto__: ImageBuffer.Overlay.prototype};
/**
- * Draws below overlays with the default zIndex.
- * @return {number} Z-index.
+ * @override
*/
ImageView.prototype.getZIndex = function() { return -1; };
/**
- * Draws the image on screen.
+ * @override
*/
ImageView.prototype.draw = function() {
+ console.log('draw');
mtomasz 2014/07/11 06:34:11 nit: remove
hirono 2014/07/11 06:41:17 Done.
if (!this.contentCanvas_) // Do nothing if the image content is not set.
return;
@@ -124,10 +127,7 @@ ImageView.prototype.draw = function() {
};
/**
- * @param {number} x X pointer position.
- * @param {number} y Y pointer position.
- * @param {boolean} mouseDown True if mouse is down.
- * @return {string} CSS cursor style.
+ * @override
*/
ImageView.prototype.getCursorStyle = function(x, y, mouseDown) {
// Indicate that the image is draggable.
@@ -139,9 +139,7 @@ ImageView.prototype.getCursorStyle = function(x, y, mouseDown) {
};
/**
- * @param {number} x X pointer position.
- * @param {number} y Y pointer position.
- * @return {function} The closure to call on drag.
+ * @override
*/
ImageView.prototype.getDragHandler = function(x, y) {
var cursor = this.getCursorStyle(x, y);
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_editor.js ('k') | ui/file_manager/gallery/js/image_editor/viewport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698