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

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

Issue 1133733003: Unified icon-buttons used in the new GAIA flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased onto ToT. Created 5 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { 5 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
6 /** @const */ var STEP_SIGNIN = 'signin'; 6 /** @const */ var STEP_SIGNIN = 'signin';
7 /** @const */ var STEP_WORKING = 'working'; 7 /** @const */ var STEP_WORKING = 'working';
8 /** @const */ var STEP_ATTRIBUTE_PROMPT = 'attribute-prompt'; 8 /** @const */ var STEP_ATTRIBUTE_PROMPT = 'attribute-prompt';
9 /** @const */ var STEP_ERROR = 'error'; 9 /** @const */ var STEP_ERROR = 'error';
10 /** @const */ var STEP_SUCCESS = 'success'; 10 /** @const */ var STEP_SUCCESS = 'success';
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 this.doRetry_.bind(this)); 111 this.doRetry_.bind(this));
112 function doneCallback() { 112 function doneCallback() {
113 chrome.send('oauthEnrollClose', ['done']); 113 chrome.send('oauthEnrollClose', ['done']);
114 }; 114 };
115 115
116 $('oauth-enroll-attribute-prompt-error-card').addEventListener( 116 $('oauth-enroll-attribute-prompt-error-card').addEventListener(
117 'buttonclick', doneCallback); 117 'buttonclick', doneCallback);
118 $('oauth-enroll-success-card').addEventListener( 118 $('oauth-enroll-success-card').addEventListener(
119 'buttonclick', doneCallback); 119 'buttonclick', doneCallback);
120 120
121 $('oauth-enroll-cancel-button').addEventListener('mousedown',
122 function(e) {
123 e.preventDefault();
124 });
125
126 $('oauth-enroll-cancel-button').addEventListener('click', 121 $('oauth-enroll-cancel-button').addEventListener('click',
127 this.cancel.bind(this)); 122 this.cancel.bind(this));
128 123
129 $('oauth-enroll-back-button').addEventListener('mousedown', function(e) {
130 e.preventDefault();
131 });
132
133 $('oauth-enroll-back-button').addEventListener('click', 124 $('oauth-enroll-back-button').addEventListener('click',
134 (function(e) { 125 (function(e) {
135 $('oauth-enroll-back-button').hidden = true; 126 $('oauth-enroll-back-button').hidden = true;
136 $('oauth-enroll-auth-view').back(); 127 $('oauth-enroll-auth-view').back();
137 e.preventDefault(); 128 e.preventDefault();
138 }).bind(this)); 129 }).bind(this));
139 130
140 $('oauth-enroll-attribute-prompt-card').addEventListener('submit', 131 $('oauth-enroll-attribute-prompt-card').addEventListener('submit',
141 this.onAttributesSubmitted.bind(this)); 132 this.onAttributesSubmitted.bind(this));
142 133
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 * Uploads the device attributes to server. This goes to C++ side through 282 * Uploads the device attributes to server. This goes to C++ side through
292 * |chrome| and launches the device attribute update negotiation. 283 * |chrome| and launches the device attribute update negotiation.
293 */ 284 */
294 onAttributesSubmitted: function() { 285 onAttributesSubmitted: function() {
295 chrome.send('oauthEnrollAttributes', 286 chrome.send('oauthEnrollAttributes',
296 [$('oauth-enroll-asset-id').value, 287 [$('oauth-enroll-asset-id').value,
297 $('oauth-enroll-location').value]); 288 $('oauth-enroll-location').value]);
298 } 289 }
299 }; 290 };
300 }); 291 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698