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

Unified Diff: chrome/browser/resources/chromeos/login/screen_public_account_signin.js

Issue 11308081: cros: Account picker UI for public account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on top of 11419184 Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/screen_public_account_signin.js
diff --git a/chrome/browser/resources/chromeos/login/screen_public_account_signin.js b/chrome/browser/resources/chromeos/login/screen_public_account_signin.js
new file mode 100644
index 0000000000000000000000000000000000000000..8a8089f1a7724428d4caa856f733f9ae97ff21f1
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/screen_public_account_signin.js
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('login', function() {
+ /**
+ * 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.
+ * @constructor
+ * @extends {HTMLDivElement}
+ */
+ var PublicAccountSigninScreen = cr.ui.define('div');
+
+ PublicAccountSigninScreen.register = function() {
+ var screen = $('public-account-signin');
+ PublicAccountSigninScreen.decorate(screen);
+ Oobe.getInstance().registerScreen(screen);
+ };
+
+ PublicAccountSigninScreen.prototype = {
+ __proto__: HTMLDivElement.prototype,
+
+ 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.
+
+ /** @override */
+ decorate: function() {
+ $('public-account-enter-button').addEventListener('click', (function(e) {
+ if (this.email_)
+ chrome.send('launchPublicAccount', [this.email_]);
+ }).bind(this));
+ },
+
+ onBeforeShow: function(data) {
+ this.email_ = data.email;
+ $('public-account-name').textContent = data.name;
+ $('public-account-avartar').src = data.imageUrl;
Ivan Korotkov 2012/11/28 21:50:39 avatar
+ }
+ };
+
+ return {
+ PublicAccountSigninScreen: PublicAccountSigninScreen
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698