| OLD | NEW |
| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 */ | 175 */ |
| 176 ImageEditor.prototype.lockUI = function(on) { | 176 ImageEditor.prototype.lockUI = function(on) { |
| 177 ImageUtil.setAttribute(this.rootContainer_, 'locked', on); | 177 ImageUtil.setAttribute(this.rootContainer_, 'locked', on); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 /** | 180 /** |
| 181 * Report the tool use to the metrics subsystem. | 181 * Report the tool use to the metrics subsystem. |
| 182 * @param {string} name Action name. | 182 * @param {string} name Action name. |
| 183 */ | 183 */ |
| 184 ImageEditor.prototype.recordToolUse = function(name) { | 184 ImageEditor.prototype.recordToolUse = function(name) { |
| 185 ImageUtil.metrics.recordEnum( | 185 metrics.recordEnum( |
| 186 ImageUtil.getMetricName('Tool'), name, this.actionNames_); | 186 ImageUtil.getMetricName('Tool'), name, this.actionNames_); |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 /** | 189 /** |
| 190 * Content update handler. | 190 * Content update handler. |
| 191 * @private | 191 * @private |
| 192 */ | 192 */ |
| 193 ImageEditor.prototype.calculateModeApplicativity_ = function() { | 193 ImageEditor.prototype.calculateModeApplicativity_ = function() { |
| 194 for (var i = 0; i != this.modes_.length; i++) { | 194 for (var i = 0; i != this.modes_.length; i++) { |
| 195 var mode = this.modes_[i]; | 195 var mode = this.modes_[i]; |
| (...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 | 1604 |
| 1605 /** | 1605 /** |
| 1606 * Hide the prompt. | 1606 * Hide the prompt. |
| 1607 */ | 1607 */ |
| 1608 ImageEditor.Prompt.prototype.hide = function() { | 1608 ImageEditor.Prompt.prototype.hide = function() { |
| 1609 if (!this.prompt_) return; | 1609 if (!this.prompt_) return; |
| 1610 this.prompt_.setAttribute('state', 'fadeout'); | 1610 this.prompt_.setAttribute('state', 'fadeout'); |
| 1611 // Allow some time for the animation to play out. | 1611 // Allow some time for the animation to play out. |
| 1612 this.setTimer(this.reset.bind(this), 500); | 1612 this.setTimer(this.reset.bind(this), 500); |
| 1613 }; | 1613 }; |
| OLD | NEW |