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

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

Issue 2223213003: ChromeOS: Implement Accessibility Options screen of material design OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit. Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer element for displaying material design OOBE. 6 * @fileoverview Polymer element for displaying material design OOBE.
7 */ 7 */
8 8
9 Polymer({ 9 Polymer({
10 is: 'oobe-welcome-md', 10 is: 'oobe-welcome-md',
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 /** 45 /**
46 * Flag that shows Language Selection screen. 46 * Flag that shows Language Selection screen.
47 */ 47 */
48 languageSelectionScreenShown: { 48 languageSelectionScreenShown: {
49 type: Boolean, 49 type: Boolean,
50 value: false, 50 value: false,
51 }, 51 },
52 52
53 /** 53 /**
54 * Flag that shows Accessibility Options screen.
55 */
56 accessibilityOptionsScreenShown: {
57 type: Boolean,
58 value: false,
59 },
60
61 /**
54 * Flag that shows Network Selection screen. 62 * Flag that shows Network Selection screen.
55 */ 63 */
56 networkSelectionScreenShown: { 64 networkSelectionScreenShown: {
57 type: Boolean, 65 type: Boolean,
58 value: false, 66 value: false,
59 }, 67 },
60 68
61 /** 69 /**
62 * Flag that enables MD-OOBE. 70 * Flag that enables MD-OOBE.
63 */ 71 */
64 enabled: { 72 enabled: {
65 type: Boolean, 73 type: Boolean,
66 value: false, 74 value: false,
67 }, 75 },
76
77 /**
78 * Accessibility options status.
79 * @type {!OobeTypes.A11yStatuses}
80 */
81 a11yStatus: {
82 type: Object,
83 },
68 }, 84 },
69 85
70 /** 86 /**
71 * Hides all screens to help switching from one screen to another. 87 * Hides all screens to help switching from one screen to another.
72 */ 88 */
73 hideAllScreens_: function() { 89 hideAllScreens_: function() {
74 this.welcomeScreenShown = false; 90 this.welcomeScreenShown = false;
75 this.networkSelectionScreenShown = false; 91 this.networkSelectionScreenShown = false;
76 this.languageSelectionScreenShown = false; 92 this.languageSelectionScreenShown = false;
93 this.accessibilityOptionsScreenShown = false;
77 }, 94 },
78 95
79 /** 96 /**
80 * GUID of the user-selected network. It is remembered after user taps on 97 * GUID of the user-selected network. It is remembered after user taps on
81 * network entry. After we receive event "connected" on this network, 98 * network entry. After we receive event "connected" on this network,
82 * OOBE will proceed. 99 * OOBE will proceed.
83 */ 100 */
84 networkLastSelectedGuid_: '', 101 networkLastSelectedGuid_: '',
85 102
86 /** 103 /**
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 * Handle "Language" button for "Welcome" screen. 159 * Handle "Language" button for "Welcome" screen.
143 * 160 *
144 * @private 161 * @private
145 */ 162 */
146 onWelcomeSelectLanguageButtonClicked_: function() { 163 onWelcomeSelectLanguageButtonClicked_: function() {
147 this.hideAllScreens_(); 164 this.hideAllScreens_();
148 this.languageSelectionScreenShown = true; 165 this.languageSelectionScreenShown = true;
149 }, 166 },
150 167
151 /** 168 /**
169 * Handle "Accessibility" button for "Welcome" screen.
170 *
171 * @private
172 */
173 onWelcomeAccessibilityButtonClicked_: function() {
174 this.hideAllScreens_();
175 this.accessibilityOptionsScreenShown = true;
176 },
177
178 /**
152 * Handle Networwork Setup screen "Proxy settings" button. 179 * Handle Networwork Setup screen "Proxy settings" button.
153 * 180 *
154 * @private 181 * @private
155 */ 182 */
156 OpenProxySettingsDialog_: function(item) { 183 OpenProxySettingsDialog_: function(item) {
157 chrome.send('launchProxySettingsDialog'); 184 chrome.send('launchProxySettingsDialog');
158 }, 185 },
159 186
160 /** 187 /**
161 * Handle Networwork Setup screen "Add WiFi network" button. 188 * Handle Networwork Setup screen "Add WiFi network" button.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 300
274 /** 301 /**
275 * Handle "OK" button for "LanguageSelection" screen. 302 * Handle "OK" button for "LanguageSelection" screen.
276 * 303 *
277 * @private 304 * @private
278 */ 305 */
279 closeLanguageSection_: function() { 306 closeLanguageSection_: function() {
280 this.hideAllScreens_(); 307 this.hideAllScreens_();
281 this.welcomeScreenShown = true; 308 this.welcomeScreenShown = true;
282 }, 309 },
310
311 /** ******************** Accessibility section ******************* */
312
313 /**
314 * Handle "OK" button for "Accessibility Options" screen.
315 *
316 * @private
317 */
318 closeAccessibilitySection_: function() {
319 this.hideAllScreens_();
320 this.welcomeScreenShown = true;
321 },
322
323 /**
324 * Handle all accessibility buttons.
325 * Note that each <oobe-a11y-option> has chromeMessage attribute
326 * containing Chromium callback name.
327 *
328 * @private
329 * @param {!Event} event
330 */
331 onA11yOptionChanged_: function(event) {
332 chrome.send(
333 event.currentTarget.chromeMessage, [event.currentTarget.checked]);
334 },
283 }); 335 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698