OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 Inline login UI. | 6 * @fileoverview Inline login UI. |
7 */ | 7 */ |
8 | 8 |
9 <include src="../gaia_auth_host/gaia_auth_host.js"></include> | 9 <include src="../gaia_auth_host/gaia_auth_host.js"></include> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 chrome.send('initialize'); | 49 chrome.send('initialize'); |
50 } | 50 } |
51 | 51 |
52 /** | 52 /** |
53 * Loads auth extension. | 53 * Loads auth extension. |
54 * @param {Object} data Parameters for auth extension. | 54 * @param {Object} data Parameters for auth extension. |
55 */ | 55 */ |
56 function loadAuthExtension(data) { | 56 function loadAuthExtension(data) { |
57 authExtHost.load(data.authMode, data, onAuthCompleted); | 57 authExtHost.load(data.authMode, data, onAuthCompleted); |
58 $('contents').classList.toggle('loading', | 58 $('contents').classList.toggle('loading', |
59 data.authMode != cr.login.GaiaAuthHost.AuthMode.DESKTOP); | 59 data.authMode != cr.login.GaiaAuthHost.AuthMode.DESKTOP || |
xiyuan
2014/06/17 22:58:14
What does this do? Is it turning off the spinner w
guohui
2014/06/18 18:44:04
this is to turn off spinner for full tab signin on
| |
60 data.constrained == '1'); | |
60 } | 61 } |
61 | 62 |
62 /** | 63 /** |
63 * Closes the inline login dialog. | 64 * Closes the inline login dialog. |
64 */ | 65 */ |
65 function closeDialog() { | 66 function closeDialog() { |
66 chrome.send('dialogClose', ['']); | 67 chrome.send('dialogClose', ['']); |
67 } | 68 } |
68 | 69 |
69 /** | 70 /** |
(...skipping 23 matching lines...) Expand all Loading... | |
93 getAuthExtHost: getAuthExtHost, | 94 getAuthExtHost: getAuthExtHost, |
94 isAuthReady: isAuthReady, | 95 isAuthReady: isAuthReady, |
95 initialize: initialize, | 96 initialize: initialize, |
96 loadAuthExtension: loadAuthExtension, | 97 loadAuthExtension: loadAuthExtension, |
97 closeDialog: closeDialog, | 98 closeDialog: closeDialog, |
98 handleOAuth2TokenFailure: handleOAuth2TokenFailure | 99 handleOAuth2TokenFailure: handleOAuth2TokenFailure |
99 }; | 100 }; |
100 }); | 101 }); |
101 | 102 |
102 document.addEventListener('DOMContentLoaded', inline.login.initialize); | 103 document.addEventListener('DOMContentLoaded', inline.login.initialize); |
OLD | NEW |