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

Side by Side Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2962823002: MD Settings: decouple page visibility from settings_ui.html. (Closed)
Patch Set: moving import out of this CL Created 3 years, 5 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 notify: true, 42 notify: true,
43 }, 43 },
44 44
45 /** @private {boolean} */ 45 /** @private {boolean} */
46 toolbarSpinnerActive_: { 46 toolbarSpinnerActive_: {
47 type: Boolean, 47 type: Boolean,
48 value: false, 48 value: false,
49 }, 49 },
50 50
51 /** 51 /**
52 * Dictionary defining page visibility.
53 * This is only set when in guest mode. All pages are visible when not set
54 * because polymer only notifies after a property is set.
55 * @private {!GuestModePageVisibility} 52 * @private {!GuestModePageVisibility}
56 */ 53 */
57 pageVisibility_: Object, 54 pageVisibility_: {type: Object, value: settings.pageVisibility},
58 55
59 /** @private */ 56 /** @private */
60 showAndroidApps_: Boolean, 57 showAndroidApps_: Boolean,
61 58
62 /** @private */ 59 /** @private */
63 lastSearchQuery_: { 60 lastSearchQuery_: {
64 type: String, 61 type: String,
65 value: '', 62 value: '',
66 } 63 }
67 }, 64 },
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 networkListItemConnecting: 116 networkListItemConnecting:
120 loadTimeData.getString('networkListItemConnecting'), 117 loadTimeData.getString('networkListItemConnecting'),
121 networkListItemConnectingTo: 118 networkListItemConnectingTo:
122 loadTimeData.getString('networkListItemConnectingTo'), 119 loadTimeData.getString('networkListItemConnectingTo'),
123 networkListItemNotConnected: 120 networkListItemNotConnected:
124 loadTimeData.getString('networkListItemNotConnected'), 121 loadTimeData.getString('networkListItemNotConnected'),
125 vpnNameTemplate: loadTimeData.getString('vpnNameTemplate'), 122 vpnNameTemplate: loadTimeData.getString('vpnNameTemplate'),
126 }; 123 };
127 // </if> 124 // </if>
128 125
129 if (loadTimeData.getBoolean('isGuest')) {
130 this.pageVisibility_ = {
131 passwordsAndForms: false,
132 people: false,
133 onStartup: false,
134 reset: false,
135 // <if expr="not chromeos">
136 appearance: false,
137 defaultBrowser: false,
138 advancedSettings: false,
139 // </if>
140 // <if expr="chromeos">
141 appearance: {
142 setWallpaper: false,
143 setTheme: false,
144 homeButton: false,
145 bookmarksBar: false,
146 pageZoom: false,
147 },
148 advancedSettings: true,
149 privacy: {
150 searchPrediction: false,
151 networkPrediction: false,
152 },
153 downloads: {
154 googleDrive: false,
155 },
156 // </if>
157 };
158 }
159
160 this.showAndroidApps_ = loadTimeData.valueExists('androidAppsVisible') && 126 this.showAndroidApps_ = loadTimeData.valueExists('androidAppsVisible') &&
161 loadTimeData.getBoolean('androidAppsVisible'); 127 loadTimeData.getBoolean('androidAppsVisible');
162 128
163 this.addEventListener('show-container', function() { 129 this.addEventListener('show-container', function() {
164 this.$.container.style.visibility = 'visible'; 130 this.$.container.style.visibility = 'visible';
165 }.bind(this)); 131 }.bind(this));
166 132
167 this.addEventListener('hide-container', function() { 133 this.addEventListener('hide-container', function() {
168 this.$.container.style.visibility = 'hidden'; 134 this.$.container.style.visibility = 'hidden';
169 }.bind(this)); 135 }.bind(this));
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 listenOnce(this.$.container, ['blur', 'pointerdown'], function() { 252 listenOnce(this.$.container, ['blur', 'pointerdown'], function() {
287 this.$.container.removeAttribute('tabindex'); 253 this.$.container.removeAttribute('tabindex');
288 }.bind(this)); 254 }.bind(this));
289 }, 255 },
290 256
291 /** @private */ 257 /** @private */
292 directionDelegateChanged_: function() { 258 directionDelegateChanged_: function() {
293 this.$.drawer.align = this.directionDelegate.isRtl() ? 'right' : 'left'; 259 this.$.drawer.align = this.directionDelegate.isRtl() ? 'right' : 'left';
294 }, 260 },
295 }); 261 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698