| OLD | NEW |
| 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 * Authenticator class wraps the communications between Gaia and its host. | 6 * Authenticator class wraps the communications between Gaia and its host. |
| 7 */ | 7 */ |
| 8 function Authenticator() { | 8 function Authenticator() { |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 /** | 30 /** |
| 31 * The key types supported by the credentials passing API. | 31 * The key types supported by the credentials passing API. |
| 32 * @type {Array} Array of strings. | 32 * @type {Array} Array of strings. |
| 33 */ | 33 */ |
| 34 Authenticator.API_KEY_TYPES = [ | 34 Authenticator.API_KEY_TYPES = [ |
| 35 'KEY_TYPE_PASSWORD_PLAIN', | 35 'KEY_TYPE_PASSWORD_PLAIN', |
| 36 ]; | 36 ]; |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * Allowed origins of the hosting page. | 39 * Allowed origins of the hosting page. |
| 40 * @type {Array.<string>} | 40 * @type {Array<string>} |
| 41 */ | 41 */ |
| 42 Authenticator.ALLOWED_PARENT_ORIGINS = [ | 42 Authenticator.ALLOWED_PARENT_ORIGINS = [ |
| 43 'chrome://oobe', | 43 'chrome://oobe', |
| 44 'chrome://chrome-signin' | 44 'chrome://chrome-signin' |
| 45 ]; | 45 ]; |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Singleton getter of Authenticator. | 48 * Singleton getter of Authenticator. |
| 49 * @return {Object} The singleton instance of Authenticator. | 49 * @return {Object} The singleton instance of Authenticator. |
| 50 */ | 50 */ |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } else if (msg.method == 'redirectToSignin' && | 496 } else if (msg.method == 'redirectToSignin' && |
| 497 this.isParentMessage_(e)) { | 497 this.isParentMessage_(e)) { |
| 498 $('gaia-frame').src = this.constructInitialFrameUrl_(); | 498 $('gaia-frame').src = this.constructInitialFrameUrl_(); |
| 499 } else { | 499 } else { |
| 500 console.error('Authenticator.onMessage: unknown message + origin!?'); | 500 console.error('Authenticator.onMessage: unknown message + origin!?'); |
| 501 } | 501 } |
| 502 } | 502 } |
| 503 }; | 503 }; |
| 504 | 504 |
| 505 Authenticator.getInstance().initialize(); | 505 Authenticator.getInstance().initialize(); |
| OLD | NEW |