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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 7461142: [ChromeOS] Assorted WebUI login fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment in #1 Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 Oobe signin screen implementation. 6 * @fileoverview Oobe signin screen implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 get header() { 43 get header() {
44 return localStrings.getString('signinScreenTitle'); 44 return localStrings.getString('signinScreenTitle');
45 }, 45 },
46 46
47 /** 47 /**
48 * Event handler that is invoked just before the frame is shown. 48 * Event handler that is invoked just before the frame is shown.
49 * @param data {string} Screen init payload. Url of auth extension start 49 * @param data {string} Screen init payload. Url of auth extension start
50 * page. 50 * page.
51 */ 51 */
52 onBeforeShow: function(data) { 52 onBeforeShow: function(data) {
53 console.log('Opening extension: ' + data); 53 console.log('Opening extension: ' + data.startUrl +
54 ', opt_email=' + data.email);
54 var frame = $('signin-frame'); 55 var frame = $('signin-frame');
55 frame.addEventListener('load', function(e) { 56 frame.addEventListener('load', function(e) {
56 console.log('Frame loaded: ' + data); 57 console.log('Frame loaded: ' + data.startUrl);
57 }); 58 });
58 frame.contentWindow.location.href = data.startUrl; 59 frame.contentWindow.location.href = data.startUrl;
59 this.extension_url_ = data.startUrl; 60 this.extension_url_ = data.startUrl;
60 // TODO(xiyuan): Pre-populate Gaia with data.email (if any). 61 // TODO(xiyuan): Pre-populate Gaia with data.email (if any).
61 }, 62 },
62 63
63 /** 64 /**
64 * Checks if message comes from the loaded authentication extension. 65 * Checks if message comes from the loaded authentication extension.
65 * @param e {object} Payload of the received HTML5 message. 66 * @param e {object} Payload of the received HTML5 message.
66 * @type {bool} 67 * @type {bool}
(...skipping 11 matching lines...) Expand all
78 if (msg.method == 'completeLogin' && this.isAuthExtMessage_(e)) { 79 if (msg.method == 'completeLogin' && this.isAuthExtMessage_(e)) {
79 chrome.send('completeLogin', [msg.email, msg.password] ); 80 chrome.send('completeLogin', [msg.email, msg.password] );
80 } 81 }
81 } 82 }
82 }; 83 };
83 84
84 return { 85 return {
85 GaiaSigninScreen: GaiaSigninScreen 86 GaiaSigninScreen: GaiaSigninScreen
86 }; 87 };
87 }); 88 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698