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

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

Issue 95713002: Inline signin UI should auto focus gaia frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only focus for the inline mode Created 7 years 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 'method': 'authPageLoaded', 181 'method': 'authPageLoaded',
182 'isSAML': this.samlPageLoaded_ 182 'isSAML': this.samlPageLoaded_
183 }, this.parentPage_); 183 }, this.parentPage_);
184 }, 184 },
185 185
186 onLoginUILoaded: function() { 186 onLoginUILoaded: function() {
187 var msg = { 187 var msg = {
188 'method': 'loginUILoaded' 188 'method': 'loginUILoaded'
189 }; 189 };
190 window.parent.postMessage(msg, this.parentPage_); 190 window.parent.postMessage(msg, this.parentPage_);
191 if (this.inlineMode_) {
192 $('gaia-frame').focus();
193 }
191 }, 194 },
192 195
193 onConfirmLogin_: function() { 196 onConfirmLogin_: function() {
194 if (!this.samlPageLoaded_) { 197 if (!this.samlPageLoaded_) {
195 this.completeLogin(this.email_, this.password_); 198 this.completeLogin(this.email_, this.password_);
196 return; 199 return;
197 } 200 }
198 201
199 this.samlSupportChannel_.sendWithCallback( 202 this.samlSupportChannel_.sendWithCallback(
200 {name: 'getScrapedPasswords'}, 203 {name: 'getScrapedPasswords'},
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } else if (msg.method == 'navigate' && 256 } else if (msg.method == 'navigate' &&
254 this.isParentMessage_(e)) { 257 this.isParentMessage_(e)) {
255 $('gaia-frame').src = msg.src; 258 $('gaia-frame').src = msg.src;
256 } else { 259 } else {
257 console.error('Authenticator.onMessage: unknown message + origin!?'); 260 console.error('Authenticator.onMessage: unknown message + origin!?');
258 } 261 }
259 } 262 }
260 }; 263 };
261 264
262 Authenticator.getInstance().initialize(); 265 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