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

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

Issue 7828044: [filebrowser] First step to image editor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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: chrome/browser/resources/file_manager/js/image_editor/image_editor.js
===================================================================
--- chrome/browser/resources/file_manager/js/image_editor/image_editor.js (revision 98602)
+++ chrome/browser/resources/file_manager/js/image_editor/image_editor.js (working copy)
@@ -8,8 +8,9 @@
* @param {HTMLElement} container
* @param {function(Blob)} saveCallback
* @param {function()} closeCallback
+ * @param {HTMLElement} toolbarContainer
*/
-function ImageEditor(container, saveCallback, closeCallback) {
+function ImageEditor(container, saveCallback, closeCallback, toolbarContainer) {
this.container_ = container;
this.saveCallback_ = saveCallback;
this.closeCallback_ = closeCallback;
@@ -29,13 +30,14 @@
this.buffer_ = new ImageBuffer(canvas);
- this.scaleControl_ = new ImageEditor.ScaleControl(
- this.canvasWrapper_, this.getBuffer().getViewport());
+// We don't need this for now.
zel 2011/09/02 17:11:58 then remove it if it's not needed
dgozman 2011/09/06 14:18:47 Done.
+// this.scaleControl_ = new ImageEditor.ScaleControl(
+// this.canvasWrapper_, this.getBuffer().getViewport());
this.panControl_ = new ImageEditor.MouseControl(canvas, this.getBuffer());
- this.toolbar_ =
- new ImageEditor.Toolbar(container, this.onOptionsChange.bind(this));
+ this.toolbar_ = new ImageEditor.Toolbar(toolbarContainer,
+ this.onOptionsChange.bind(this));
this.initToolbar();
}
@@ -112,7 +114,7 @@
this.createModeButtons();
this.toolbar_.addButton('Save', this.save.bind(this, true));
- this.toolbar_.addButton('Close', this.close.bind(this, false));
+// this.toolbar_.addButton('Close', this.close.bind(this, false));
zel 2011/09/02 17:11:58 if this button is removed, please remove this line
dgozman 2011/09/06 14:18:47 Done.
};
/**

Powered by Google App Engine
This is Rietveld 408576698