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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 8360003: [cros] OOBE: add histograms for Profile image fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed HandleScreenShown. Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * @fileoverview Oobe user image screen implementation. 6 * @fileoverview Oobe user image screen implementation.
7 */ 7 */
8 8
9 cr.define('oobe', function() { 9 cr.define('oobe', function() {
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 this.acceptImage_(); 204 this.acceptImage_();
205 }, 205 },
206 206
207 /** 207 /**
208 * Event handler that is invoked just before the screen is shown. 208 * Event handler that is invoked just before the screen is shown.
209 * @param {object} data Screen init payload. 209 * @param {object} data Screen init payload.
210 */ 210 */
211 onBeforeShow: function(data) { 211 onBeforeShow: function(data) {
212 Oobe.getInstance().headerHidden = true; 212 Oobe.getInstance().headerHidden = true;
213 $('user-image-grid').updateAndFocus(); 213 $('user-image-grid').updateAndFocus();
214 chrome.send('onUserImageScreenShown', [(new Date()).getTime()/1000]);
zel 2011/10/20 21:57:44 you should not use time from JS side here, you sho
Ivan Korotkov 2011/10/21 07:52:00 Why? I'm interested in the delay between Show() is
Ivan Korotkov 2011/10/21 12:29:52 Hm, ok, as discussed offline it's better to use a
214 }, 215 },
215 216
216 /** 217 /**
217 * Accepts currently selected image, if possible. 218 * Accepts currently selected image, if possible.
218 * @private 219 * @private
219 */ 220 */
220 acceptImage_: function() { 221 acceptImage_: function() {
221 if (!$('ok-button').disabled) 222 if (!$('ok-button').disabled)
222 chrome.send('onUserImageAccepted'); 223 chrome.send('onUserImageAccepted');
223 }, 224 },
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 ].forEach(function(name) { 325 ].forEach(function(name) {
325 UserImageScreen[name] = function(value) { 326 UserImageScreen[name] = function(value) {
326 $('user-image')[name + '_'](value); 327 $('user-image')[name + '_'](value);
327 }; 328 };
328 }); 329 });
329 330
330 return { 331 return {
331 UserImageScreen: UserImageScreen 332 UserImageScreen: UserImageScreen
332 }; 333 };
333 }); 334 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698