| OLD | NEW |
| 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 | 6 * @fileoverview |
| 7 * 'android-apps-page' is the settings page for enabling android apps. | 7 * 'android-apps-page' is the settings page for enabling android apps. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 havePlayStoreApp: Boolean, | 22 havePlayStoreApp: Boolean, |
| 23 | 23 |
| 24 androidAppsInfo: Object, | 24 androidAppsInfo: Object, |
| 25 | 25 |
| 26 /** @private {!Map<string, string>} */ | 26 /** @private {!Map<string, string>} */ |
| 27 focusConfig_: { | 27 focusConfig_: { |
| 28 type: Object, | 28 type: Object, |
| 29 value: function() { | 29 value: function() { |
| 30 var map = new Map(); | 30 var map = new Map(); |
| 31 map.set( | 31 if (settings.routes.ANDROID_APPS_DETAILS) { |
| 32 settings.Route.ANDROID_APPS_DETAILS.path, | 32 map.set( |
| 33 '#android-apps .subpage-arrow'); | 33 settings.routes.ANDROID_APPS_DETAILS.path, |
| 34 '#android-apps .subpage-arrow'); |
| 35 } |
| 34 return map; | 36 return map; |
| 35 }, | 37 }, |
| 36 }, | 38 }, |
| 37 }, | 39 }, |
| 38 | 40 |
| 39 /** | 41 /** |
| 40 * @param {!Event} event | 42 * @param {!Event} event |
| 41 * @private | 43 * @private |
| 42 */ | 44 */ |
| 43 onEnableTap_: function(event) { | 45 onEnableTap_: function(event) { |
| 44 this.setPrefValue('arc.enabled', true); | 46 this.setPrefValue('arc.enabled', true); |
| 45 event.stopPropagation(); | 47 event.stopPropagation(); |
| 46 }, | 48 }, |
| 47 | 49 |
| 48 /** @return {boolean} */ | 50 /** @return {boolean} */ |
| 49 isEnforced_: function(pref) { | 51 isEnforced_: function(pref) { |
| 50 return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED; | 52 return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED; |
| 51 }, | 53 }, |
| 52 | 54 |
| 53 /** @private */ | 55 /** @private */ |
| 54 onSubpageTap_: function() { | 56 onSubpageTap_: function() { |
| 55 if (this.androidAppsInfo.playStoreEnabled) | 57 if (this.androidAppsInfo.playStoreEnabled) |
| 56 settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS); | 58 settings.navigateTo(settings.routes.ANDROID_APPS_DETAILS); |
| 57 }, | 59 }, |
| 58 }); | 60 }); |
| OLD | NEW |