OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <include src="saml_handler.js"> | 5 <include src="saml_handler.js"> |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview An UI component to authenciate to Chrome. The component hosts | 8 * @fileoverview An UI component to authenciate to Chrome. The component hosts |
9 * IdP web pages in a webview. A client who is interested in monitoring | 9 * IdP web pages in a webview. A client who is interested in monitoring |
10 * authentication events should pass a listener object of type | 10 * authentication events should pass a listener object of type |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 /** | 246 /** |
247 * Manually updates the history. Invoked upon completion of a webview | 247 * Manually updates the history. Invoked upon completion of a webview |
248 * navigation. | 248 * navigation. |
249 * @param {string} url Request URL. | 249 * @param {string} url Request URL. |
250 * @private | 250 * @private |
251 */ | 251 */ |
252 Authenticator.prototype.updateHistoryState_ = function(url) { | 252 Authenticator.prototype.updateHistoryState_ = function(url) { |
253 if (history.state && history.state.url != url) | 253 if (history.state && history.state.url != url) |
254 history.pushState({url: url}, ''); | 254 history.pushState({url: url}, ''); |
255 else | 255 else |
256 history.replaceState({url: url}); | 256 history.replaceState({url: url}, ''); |
257 }; | 257 }; |
258 | 258 |
259 /** | 259 /** |
260 * Invoked when the sign-in page takes focus. | 260 * Invoked when the sign-in page takes focus. |
261 * @param {object} e The focus event being triggered. | 261 * @param {object} e The focus event being triggered. |
262 * @private | 262 * @private |
263 */ | 263 */ |
264 Authenticator.prototype.onFocus_ = function(e) { | 264 Authenticator.prototype.onFocus_ = function(e) { |
265 this.webview_.focus(); | 265 this.webview_.focus(); |
266 }; | 266 }; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 Authenticator.AuthFlow = AuthFlow; | 526 Authenticator.AuthFlow = AuthFlow; |
527 Authenticator.AuthMode = AuthMode; | 527 Authenticator.AuthMode = AuthMode; |
528 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 528 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
529 | 529 |
530 return { | 530 return { |
531 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old | 531 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old |
532 // iframe-based flow is deprecated. | 532 // iframe-based flow is deprecated. |
533 GaiaAuthHost: Authenticator | 533 GaiaAuthHost: Authenticator |
534 }; | 534 }; |
535 }); | 535 }); |
OLD | NEW |