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

Side by Side Diff: chrome/browser/resources/gaia_auth/main.js

Issue 125863003: Fix focus loss on chrome signin page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment added Created 6 years, 11 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 | no next file » | 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 * 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 'domain': extractDomain(msg.url) 224 'domain': extractDomain(msg.url)
225 }, this.parentPage_); 225 }, this.parentPage_);
226 }, 226 },
227 227
228 onLoginUILoaded: function() { 228 onLoginUILoaded: function() {
229 var msg = { 229 var msg = {
230 'method': 'loginUILoaded' 230 'method': 'loginUILoaded'
231 }; 231 };
232 window.parent.postMessage(msg, this.parentPage_); 232 window.parent.postMessage(msg, this.parentPage_);
233 if (this.inlineMode_) { 233 if (this.inlineMode_) {
234 $('gaia-frame').focus(); 234 // TODO(guohui): temporary workaround until webview team fixes the focus
235 // on their side.
236 var gaiaFrame = $('gaia-frame');
237 gaiaFrame.focus();
238 gaiaFrame.onblur = function() {
239 gaiaFrame.focus();
240 };
235 } 241 }
236 this.loaded_ = true; 242 this.loaded_ = true;
237 }, 243 },
238 244
239 onConfirmLogin_: function() { 245 onConfirmLogin_: function() {
240 if (!this.isSAMLFlow_) { 246 if (!this.isSAMLFlow_) {
241 this.completeLogin(this.email_, this.password_); 247 this.completeLogin(this.email_, this.password_);
242 return; 248 return;
243 } 249 }
244 250
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } else if (msg.method == 'redirectToSignin' && 310 } else if (msg.method == 'redirectToSignin' &&
305 this.isParentMessage_(e)) { 311 this.isParentMessage_(e)) {
306 $('gaia-frame').src = this.constructInitialFrameUrl_(); 312 $('gaia-frame').src = this.constructInitialFrameUrl_();
307 } else { 313 } else {
308 console.error('Authenticator.onMessage: unknown message + origin!?'); 314 console.error('Authenticator.onMessage: unknown message + origin!?');
309 } 315 }
310 } 316 }
311 }; 317 };
312 318
313 Authenticator.getInstance().initialize(); 319 Authenticator.getInstance().initialize();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698