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

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

Issue 8436002: [cros] Remove Views implementation for login/OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 cr.define('oobe', function() {
6 /**
7 * Creates a new oobe screen div.
8 * @constructor
9 * @extends {HTMLDivElement}
10 */
11 var EnrollmentScreen = cr.ui.define('div');
12
13 /**
14 * Registers with Oobe.
15 */
16 EnrollmentScreen.register = function() {
17 var screen = $('enrollment');
18 EnrollmentScreen.decorate(screen);
19 Oobe.getInstance().registerScreen(screen);
20 };
21
22 EnrollmentScreen.prototype = {
23 __proto__: HTMLDivElement.prototype,
24
25 /** @inheritDoc */
26 decorate: function() {
27 // TODO(altimofeev): add accelerators for the Enterprise Enrollment
28 // screen.
29 },
30
31 /**
32 * Header text of the screen.
33 * @type {string}
34 */
35 get header() {
36 return localStrings.getString('loginHeader');
37 },
38
39 /**
40 * Event handler that is invoked just before the frame is shown.
41 * @param {object} data Screen init payload.
42 */
43 onBeforeShow: function(data) {
44 // Reload the gaia frame.
45 $('gaia-local-login').src = 'chrome://oobe/gaialogin';
46 },
47
48 /**
49 * Buttons in oobe wizard's button strip.
50 * @type {array} Array of Buttons.
51 */
52 get buttons() {
53 var buttons = [];
54
55 var closeButton = this.ownerDocument.createElement('button');
56 closeButton.id = 'close-button';
57 closeButton.textContent = localStrings.getString('confirmationClose');
58 closeButton.addEventListener('click', function(e) {
59 chrome.send('confirmationClose', []);
60 });
61 buttons.push(closeButton);
62
63 return buttons;
64 }
65 };
66
67 /**
68 * Shows confirmation screen for the enterprise enrollment.
69 */
70 EnrollmentScreen.showConfirmationScreen = function() {
71 $('enroll-login-screen').hidden = true;
72 $('enroll-confirmation-screen').hidden = false;
73 $('close-button').classList.add('visible');
74 };
75
76 return {
77 EnrollmentScreen: EnrollmentScreen
78 };
79 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698