OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 cr.define('login', function() { | |
6 /** | |
7 * Creates a new public account sign in screen. | |
Nikita (slow)
2012/11/28 18:57:34
nit: at sign in screen
bartfab (slow)
2012/11/29 14:32:28
How does this class "create a new public account a
Nikita (slow)
2012/11/29 15:21:47
Right.
| |
8 * @constructor | |
9 * @extends {HTMLDivElement} | |
10 */ | |
11 var PublicAccountSigninScreen = cr.ui.define('div'); | |
12 | |
13 PublicAccountSigninScreen.register = function() { | |
14 var screen = $('public-account-signin'); | |
15 PublicAccountSigninScreen.decorate(screen); | |
16 Oobe.getInstance().registerScreen(screen); | |
17 }; | |
18 | |
19 PublicAccountSigninScreen.prototype = { | |
20 __proto__: HTMLDivElement.prototype, | |
21 | |
22 email_: undefined, | |
bartfab (slow)
2012/11/28 15:11:38
Is this needed? If you try to access |this.email_|
Ivan Korotkov
2012/11/28 21:50:39
This is what roughly corresponds to a static membe
bartfab (slow)
2012/11/29 14:32:28
Well, it's only a static default. If you set this.
| |
23 | |
24 /** @override */ | |
25 decorate: function() { | |
26 $('public-account-enter-button').addEventListener('click', (function(e) { | |
27 if (this.email_) | |
28 chrome.send('launchPublicAccount', [this.email_]); | |
29 }).bind(this)); | |
30 }, | |
31 | |
32 onBeforeShow: function(data) { | |
33 this.email_ = data.email; | |
34 $('public-account-name').textContent = data.name; | |
35 $('public-account-avartar').src = data.imageUrl; | |
Ivan Korotkov
2012/11/28 21:50:39
avatar
| |
36 } | |
37 }; | |
38 | |
39 return { | |
40 PublicAccountSigninScreen: PublicAccountSigninScreen | |
41 }; | |
42 }); | |
OLD | NEW |