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

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

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 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 Polymer({ 5 Polymer({
6 is: 'oobe-welcome-dialog', 6 is: 'oobe-welcome-dialog',
7 properties: { 7 properties: {
8 /** 8 /**
9 * Currently selected system language (display name). 9 * Currently selected system language (display name).
10 */ 10 */
11 currentLanguage: { 11 currentLanguage: {
12 type: String, 12 type: String,
13 value: '', 13 value: '',
14 }, 14 },
15 15
16 /** 16 /**
17 * Controls visibility of "Timezone" button. 17 * Controls visibility of "Timezone" button.
18 */ 18 */
19 timezoneButtonVisible: { 19 timezoneButtonVisible: {
20 type: Boolean, 20 type: Boolean,
21 value: false, 21 value: false,
22 }, 22 },
23 23
24 /** 24 /**
25 * Controls displaying of "Enable debugging features" link. 25 * Controls displaying of "Enable debugging features" link.
26 */ 26 */
27 debuggingLinkVisible: Boolean, 27 debuggingLinkVisible: Boolean,
28 }, 28 },
29 29
30 /** 30 /**
31 * This is stored ID of currently focused element to restore id on returns 31 * This is stored ID of currently focused element to restore id on returns
32 * to this dialog from Language / Timezone Selection dialogs. 32 * to this dialog from Language / Timezone Selection dialogs.
33 */ 33 */
34 focusedElement_: 'languageSelectionButton', 34 focusedElement_: 'languageSelectionButton',
35 35
36 onLanguageClicked_: function() { 36 onLanguageClicked_: function() {
37 this.focusedElement_ = "languageSelectionButton"; 37 this.focusedElement_ = 'languageSelectionButton';
38 this.fire('language-button-clicked'); 38 this.fire('language-button-clicked');
39 }, 39 },
40 40
41 onAccessibilityClicked_: function() { 41 onAccessibilityClicked_: function() {
42 this.focusedElement_ = "accessibilitySettingsButton"; 42 this.focusedElement_ = 'accessibilitySettingsButton';
43 this.fire('accessibility-button-clicked'); 43 this.fire('accessibility-button-clicked');
44 }, 44 },
45 45
46 onTimezoneClicked_: function() { 46 onTimezoneClicked_: function() {
47 this.focusedElement_ = "timezoneSettingsButton"; 47 this.focusedElement_ = 'timezoneSettingsButton';
48 this.fire('timezone-button-clicked'); 48 this.fire('timezone-button-clicked');
49 }, 49 },
50 50
51 onNextClicked_: function() { 51 onNextClicked_: function() {
52 this.focusedElement_ = "welcomeNextButton"; 52 this.focusedElement_ = 'welcomeNextButton';
53 this.fire('next-button-clicked'); 53 this.fire('next-button-clicked');
54 }, 54 },
55 55
56 onDebuggingLinkClicked_: function() { 56 onDebuggingLinkClicked_: function() {
57 chrome.send('login.NetworkScreen.userActed', 57 chrome.send(
58 ['connect-debugging-features']); 58 'login.NetworkScreen.userActed', ['connect-debugging-features']);
59 }, 59 },
60 60
61 attached: function() { 61 attached: function() {
62 this.focus(); 62 this.focus();
63 }, 63 },
64 64
65 focus: function() { 65 focus: function() {
66 var focusedElement = this.$[this.focusedElement_]; 66 var focusedElement = this.$[this.focusedElement_];
67 if (focusedElement) 67 if (focusedElement)
68 focusedElement.focus(); 68 focusedElement.focus();
69 }, 69 },
70 70
71 /** 71 /**
72 * This is called from oobe_welcome when this dialog is shown. 72 * This is called from oobe_welcome when this dialog is shown.
73 */ 73 */
74 show: function() { 74 show: function() {
75 this.focus(); 75 this.focus();
76 }, 76 },
77 77
78 /** 78 /**
79 * This function formats message for labels. 79 * This function formats message for labels.
80 * @param String label i18n string ID. 80 * @param String label i18n string ID.
81 * @param String parameter i18n string parameter. 81 * @param String parameter i18n string parameter.
82 * @private 82 * @private
83 */ 83 */
84 formatMessage_: function(label, parameter) { 84 formatMessage_: function(label, parameter) {
85 return loadTimeData.getStringF(label, parameter); 85 return loadTimeData.getStringF(label, parameter);
86 }, 86 },
87 }); 87 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698