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

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

Issue 422563002: Prevented false error messages from user manager UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_gaia_signin.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 5 /**
6 * @fileoverview Demo login UI. 6 * @fileoverview Demo login UI.
7 */ 7 */
8 8
9 /** 9 /**
10 * Handles a user clicking anywhere on the screen. This will log the demo user 10 * Handles a user clicking anywhere on the screen. This will log the demo user
11 * in. Yes, this actually _is the intention. 11 * in. Yes, this actually _is the intention.
12 * @param {Event} e The click event that triggered this function. 12 * @param {Event} e The click event that triggered this function.
13 */ 13 */
14 onClick = function(e) { 14 onClick = function(e) {
15 document.removeEventListener('click', onClick); 15 document.removeEventListener('click', onClick);
16 e.stopPropagation(); 16 e.stopPropagation();
17 showLoginSpinner(); 17 showLoginSpinner();
18 chrome.send('launchDemoUser'); 18 chrome.send('launchDemoUser');
19 }; 19 };
20 20
21 /** 21 /**
22 * Initializes the click handler. 22 * Initializes the click handler.
23 */ 23 */
24 initialize = function() { 24 initialize = function() {
25 $('page').style.opacity = 1; 25 $('page').style.opacity = 1;
26 document.addEventListener('click', onClick); 26 document.addEventListener('click', onClick);
27 // Report back sign in UI being painted. 27 // Report back sign in UI being painted.
28 window.webkitRequestAnimationFrame(function() { 28 window.requestAnimationFrame(function() {
29 chrome.send('loginVisible', ['demo']); 29 chrome.send('loginVisible', ['demo']);
30 }); 30 });
31 }; 31 };
32 32
33 /** 33 /**
34 * Show the login spinner. 34 * Show the login spinner.
35 */ 35 */
36 showLoginSpinner = function() { 36 showLoginSpinner = function() {
37 // We're already logging in - don't login on click. 37 // We're already logging in - don't login on click.
38 document.removeEventListener('click', onClick); 38 document.removeEventListener('click', onClick);
39 39
40 // Hide the "Click to start" and show the spinner. 40 // Hide the "Click to start" and show the spinner.
41 $('demo-login-text').hidden = true; 41 $('demo-login-text').hidden = true;
42 $('login-spinner').hidden = false; 42 $('login-spinner').hidden = false;
43 }; 43 };
44 44
45 disableTextSelectAndDrag(); 45 disableTextSelectAndDrag();
46 document.addEventListener('DOMContentLoaded', initialize); 46 document.addEventListener('DOMContentLoaded', initialize);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_gaia_signin.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698