Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 cr.define('settings_test', function() { | |
| 6 var changePictureOptions = settings_test.changePictureOptions || { | |
| 7 /** | |
| 8 * True if property changes should fire events for testing purposes. | |
| 9 * @type {boolean} | |
| 10 */ | |
| 11 notifyPropertyChangesForTest: false, | |
| 12 }; | |
| 13 return {changePictureOptions: changePictureOptions}; | |
| 14 }); | |
|
Dan Beam
2016/03/16 17:22:29
why can't this just be
cr.exportPath('settings_te
| |
| 15 | |
| 5 /** | 16 /** |
| 6 * @fileoverview | 17 * @fileoverview |
| 7 * 'settings-change-picture' is the settings subpage containing controls to | 18 * 'settings-change-picture' is the settings subpage containing controls to |
| 8 * edit a ChromeOS user's picture. | 19 * edit a ChromeOS user's picture. |
| 9 * | 20 * |
| 10 * @group Chrome Settings Elements | 21 * @group Chrome Settings Elements |
| 11 * @element settings-change-picture | 22 * @element settings-change-picture |
| 12 */ | 23 */ |
| 13 Polymer({ | 24 Polymer({ |
| 14 is: 'settings-change-picture', | 25 is: 'settings-change-picture', |
| 15 | 26 |
| 16 behaviors: [ | 27 behaviors: [ |
| 17 I18nBehavior, | 28 I18nBehavior, |
| 18 ], | 29 ], |
| 19 | 30 |
| 20 properties: { | 31 properties: { |
| 21 /** | 32 /** |
| 22 * The currently selected profile image URL. May be a data URL. | 33 * The currently selected profile image URL. May be a data URL. |
| 23 * @private {string} | 34 * @private {string} |
| 24 */ | 35 */ |
| 25 selectedImageUrl_: String, | 36 selectedImageUrl_: { |
| 37 type: String, | |
| 38 notify: settings_test.changePictureOptions.notifyPropertyChangesForTest, | |
| 39 }, | |
| 26 | 40 |
| 27 /** | 41 /** |
| 28 * The url of the 'old' image, which is the existing image sourced from | 42 * The url of the 'old' image, which is the existing image sourced from |
| 29 * the camera, a file, or a deprecated default image. | 43 * the camera, a file, or a deprecated default image. |
| 30 * @private {string} | 44 * @private {string} |
| 31 */ | 45 */ |
| 32 oldImageUrl_: String, | 46 oldImageUrl_: String, |
| 33 | 47 |
| 34 /** | 48 /** |
| 35 * The url of the profile image. | 49 * The url of the profile image. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 * Computed binding determining which profile image button is toggled on. | 173 * Computed binding determining which profile image button is toggled on. |
| 160 * @private | 174 * @private |
| 161 * @param {string} imageUrl | 175 * @param {string} imageUrl |
| 162 * @param {string} selectedImageUrl | 176 * @param {string} selectedImageUrl |
| 163 * @return {boolean} | 177 * @return {boolean} |
| 164 */ | 178 */ |
| 165 isActiveImage_: function(imageUrl, selectedImageUrl) { | 179 isActiveImage_: function(imageUrl, selectedImageUrl) { |
| 166 return imageUrl == selectedImageUrl; | 180 return imageUrl == selectedImageUrl; |
| 167 }, | 181 }, |
| 168 }); | 182 }); |
| OLD | NEW |