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

Side by Side Diff: ui/file_manager/gallery/js/image_editor/image_editor.js

Issue 1304883005: Make |context| passed to queryRequiredElement optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whoops Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * ImageEditor is the top level object that holds together and connects 6 * ImageEditor is the top level object that holds together and connects
7 * everything needed for image editing. 7 * everything needed for image editing.
8 * 8 *
9 * @param {!Viewport} viewport The viewport. 9 * @param {!Viewport} viewport The viewport.
10 * @param {!ImageView} imageView The ImageView containing the images to edit. 10 * @param {!ImageView} imageView The ImageView containing the images to edit.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 */ 102 */
103 this.redoButton_ = this.createToolButton_('redo', 'GALLERY_REDO', 103 this.redoButton_ = this.createToolButton_('redo', 'GALLERY_REDO',
104 this.redo.bind(this)); 104 this.redo.bind(this));
105 this.registerAction_('redo'); 105 this.registerAction_('redo');
106 106
107 /** 107 /**
108 * @private {!HTMLElement} 108 * @private {!HTMLElement}
109 * @const 109 * @const
110 */ 110 */
111 this.exitButton_ = /** @type {!HTMLElement} */ 111 this.exitButton_ = /** @type {!HTMLElement} */
112 (queryRequiredElement(document, '.edit-mode-toolbar paper-button.exit')); 112 (queryRequiredElement('.edit-mode-toolbar paper-button.exit'));
113 this.exitButton_.addEventListener('click', this.onExitClicked_.bind(this)); 113 this.exitButton_.addEventListener('click', this.onExitClicked_.bind(this));
114 114
115 /** 115 /**
116 * @private {!FilesToast} 116 * @private {!FilesToast}
117 */ 117 */
118 this.filesToast_ = /** @type {!FilesToast}*/ 118 this.filesToast_ = /** @type {!FilesToast}*/
119 (queryRequiredElement(document, 'files-toast')); 119 (queryRequiredElement('files-toast'));
120 } 120 }
121 121
122 ImageEditor.prototype.__proto__ = cr.EventTarget.prototype; 122 ImageEditor.prototype.__proto__ = cr.EventTarget.prototype;
123 123
124 /** 124 /**
125 * Handles click event of exit button. 125 * Handles click event of exit button.
126 * @private 126 * @private
127 */ 127 */
128 ImageEditor.prototype.onExitClicked_ = function() { 128 ImageEditor.prototype.onExitClicked_ = function() {
129 var event = new Event('exit-clicked'); 129 var event = new Event('exit-clicked');
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 1431
1432 /** 1432 /**
1433 * Hide the prompt. 1433 * Hide the prompt.
1434 */ 1434 */
1435 ImageEditor.Prompt.prototype.hide = function() { 1435 ImageEditor.Prompt.prototype.hide = function() {
1436 if (!this.prompt_) return; 1436 if (!this.prompt_) return;
1437 this.prompt_.setAttribute('state', 'fadeout'); 1437 this.prompt_.setAttribute('state', 'fadeout');
1438 // Allow some time for the animation to play out. 1438 // Allow some time for the animation to play out.
1439 this.setTimer(this.reset.bind(this), 500); 1439 this.setTimer(this.reset.bind(this), 500);
1440 }; 1440 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698