OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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('options', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
8 var UserImagesGrid = options.UserImagesGrid; | 8 var UserImagesGrid = options.UserImagesGrid; |
9 var ButtonImages = UserImagesGrid.ButtonImages; | 9 var ButtonImages = UserImagesGrid.ButtonImages; |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (url && ButtonImageUrls.indexOf(url) == -1) | 179 if (url && ButtonImageUrls.indexOf(url) == -1) |
180 this.closePage_(); | 180 this.closePage_(); |
181 }, | 181 }, |
182 | 182 |
183 /** | 183 /** |
184 * URL of the current user image. | 184 * URL of the current user image. |
185 * @type {string} | 185 * @type {string} |
186 */ | 186 */ |
187 get currentUserImageUrl() { | 187 get currentUserImageUrl() { |
188 return 'chrome://userimage/' + BrowserOptions.getLoggedInUsername() + | 188 return 'chrome://userimage/' + BrowserOptions.getLoggedInUsername() + |
189 '?id=' + (new Date()).getTime(); | 189 '?id=' + (new Date()).getTime() + |
| 190 '&animated=true'; |
190 }, | 191 }, |
191 | 192 |
192 /** | 193 /** |
193 * Notifies about camera presence change. | 194 * Notifies about camera presence change. |
194 * @param {boolean} present Whether a camera is present or not. | 195 * @param {boolean} present Whether a camera is present or not. |
195 * @private | 196 * @private |
196 */ | 197 */ |
197 setCameraPresent_: function(present) { | 198 setCameraPresent_: function(present) { |
198 var imageGrid = $('images-grid'); | 199 var imageGrid = $('images-grid'); |
199 // Ephemeral users can choose from the standard pictures only. This is | 200 // Ephemeral users can choose from the standard pictures only. This is |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 return instance[name + '_'].apply(instance, arguments); | 289 return instance[name + '_'].apply(instance, arguments); |
289 }; | 290 }; |
290 }); | 291 }); |
291 | 292 |
292 // Export | 293 // Export |
293 return { | 294 return { |
294 ChangePictureOptions: ChangePictureOptions | 295 ChangePictureOptions: ChangePictureOptions |
295 }; | 296 }; |
296 | 297 |
297 }); | 298 }); |
298 | |
OLD | NEW |