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

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

Issue 2964293002: CrOS Settings: Add skeleton page for multidevice section. (Closed)
Patch Set: Sync and rebase 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-basic-page' is the settings page containing the actual settings. 7 * 'settings-basic-page' is the settings page containing the actual settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-basic-page', 10 is: 'settings-basic-page',
11 11
12 behaviors: [MainPageBehavior, WebUIListenerBehavior], 12 behaviors: [MainPageBehavior, WebUIListenerBehavior],
13 13
14 properties: { 14 properties: {
15 /** Preferences state. */ 15 /** Preferences state. */
16 prefs: { 16 prefs: {
17 type: Object, 17 type: Object,
18 notify: true, 18 notify: true,
19 }, 19 },
20 20
21 // <if expr="chromeos">
21 showAndroidApps: Boolean, 22 showAndroidApps: Boolean,
22 23
24 showMultidevice: Boolean,
25
23 havePlayStoreApp: Boolean, 26 havePlayStoreApp: Boolean,
27 // </if>
24 28
25 /** @type {!AndroidAppsInfo|undefined} */ 29 /** @type {!AndroidAppsInfo|undefined} */
26 androidAppsInfo: Object, 30 androidAppsInfo: Object,
27 31
28 showChromeCleanup: { 32 showChromeCleanup: {
29 type: Boolean, 33 type: Boolean,
30 value: function() { 34 value: function() {
31 return loadTimeData.valueExists('chromeCleanupEnabled') && 35 return loadTimeData.valueExists('chromeCleanupEnabled') &&
32 loadTimeData.getBoolean('chromeCleanupEnabled'); 36 loadTimeData.getBoolean('chromeCleanupEnabled');
33 }, 37 },
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // settings app is not yet available. 217 // settings app is not yet available.
214 if (!this.havePlayStoreApp && 218 if (!this.havePlayStoreApp &&
215 (!this.androidAppsInfo || !this.androidAppsInfo.settingsAppAvailable)) { 219 (!this.androidAppsInfo || !this.androidAppsInfo.settingsAppAvailable)) {
216 return false; 220 return false;
217 } 221 }
218 222
219 return true; 223 return true;
220 }, 224 },
221 225
222 /** 226 /**
227 * @return {boolean} Whether to show the multidevice settings page.
228 * @private
229 */
230 shouldShowMultidevice_: function() {
231 var visibility = /** @type {boolean|undefined} */ (
232 this.get('pageVisibility.multidevice'));
233 return this.showMultidevice && this.showPage_(visibility);
234 },
235
236 /**
223 * Hides everything but the newly expanded subpage. 237 * Hides everything but the newly expanded subpage.
224 * @private 238 * @private
225 */ 239 */
226 onSubpageExpanded_: function() { 240 onSubpageExpanded_: function() {
227 this.hasExpandedSection_ = true; 241 this.hasExpandedSection_ = true;
228 }, 242 },
229 243
230 /** 244 /**
231 * Render the advanced page now (don't wait for idle). 245 * Render the advanced page now (don't wait for idle).
232 * @private 246 * @private
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 303
290 /** 304 /**
291 * @param {boolean} opened Whether the menu is expanded. 305 * @param {boolean} opened Whether the menu is expanded.
292 * @return {string} Icon name. 306 * @return {string} Icon name.
293 * @private 307 * @private
294 */ 308 */
295 getArrowIcon_: function(opened) { 309 getArrowIcon_: function(opened) {
296 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 310 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
297 }, 311 },
298 }); 312 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698