OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 var url = e.target.src; | 147 var url = e.target.src; |
148 if (url && ButtonImageUrls.indexOf(url) == -1) | 148 if (url && ButtonImageUrls.indexOf(url) == -1) |
149 this.closePage_(); | 149 this.closePage_(); |
150 }, | 150 }, |
151 | 151 |
152 /** | 152 /** |
153 * URL of the current user image. | 153 * URL of the current user image. |
154 * @type {string} | 154 * @type {string} |
155 */ | 155 */ |
156 get currentUserImageUrl() { | 156 get currentUserImageUrl() { |
157 return 'chrome://userimage/' + PersonalOptions.getLoggedInUserEmail() + | 157 return 'chrome://userimage/' + PersonalOptions.getLoggedInUsername() + |
158 '?id=' + (new Date()).getTime(); | 158 '?id=' + (new Date()).getTime(); |
159 }, | 159 }, |
160 | 160 |
161 /** | 161 /** |
162 * Notifies about camera presence change. | 162 * Notifies about camera presence change. |
163 * @param {boolean} present Whether a camera is present or not. | 163 * @param {boolean} present Whether a camera is present or not. |
164 * @private | 164 * @private |
165 */ | 165 */ |
166 setCameraPresent_: function(present) { | 166 setCameraPresent_: function(present) { |
167 var imageGrid = $('images-grid'); | 167 var imageGrid = $('images-grid'); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 }; | 244 }; |
245 }); | 245 }); |
246 | 246 |
247 // Export | 247 // Export |
248 return { | 248 return { |
249 ChangePictureOptions: ChangePictureOptions | 249 ChangePictureOptions: ChangePictureOptions |
250 }; | 250 }; |
251 | 251 |
252 }); | 252 }); |
253 | 253 |
OLD | NEW |