Index: chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_page.js b/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
index 53128b7f70fd29c2ec19594d8a381209d536929b..b7fd76aac87b29082b4052171ff9203c17e6be01 100644 |
--- a/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
+++ b/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
@@ -14,7 +14,10 @@ Polymer({ |
properties: { |
/** Preferences state. */ |
- prefs: Object, |
+ prefs: { |
+ type: Object, |
+ notify: true, |
+ }, |
/** @private {!AndroidAppsInfo|undefined} */ |
androidAppsInfo_: Object, |
@@ -34,7 +37,6 @@ Polymer({ |
'android-apps-info-update', this.androidAppsInfoUpdate_.bind(this)); |
this.browserProxy_.requestAndroidAppsInfo(); |
}, |
- |
/** |
* @param {AndroidAppsInfo} info |
* @private |
@@ -47,65 +49,14 @@ Polymer({ |
* @param {Event} event |
* @private |
*/ |
- onManageAndroidAppsKeydown_: function(event) { |
- if (event.key != 'Enter' && event.key != ' ') |
- return; |
- this.browserProxy_.showAndroidAppsSettings(true /** keyboardAction */); |
+ onEnableTap_: function(event) { |
+ this.setPrefValue('arc.enabled', true); |
event.stopPropagation(); |
}, |
/** @private */ |
- onManageAndroidAppsTap_: function(event) { |
- this.browserProxy_.showAndroidAppsSettings(false /** keyboardAction */); |
- }, |
- |
- /** |
- * @return {string} |
- * @private |
- */ |
- getDialogBody_: function() { |
- return this.i18nAdvanced( |
- 'androidAppsDisableDialogMessage', {substitutions: [], tags: ['br']}); |
- }, |
- |
- /** |
- * Handles the change event for the arc.enabled checkbox. Shows a |
- * confirmation dialog when disabling the preference. |
- * @param {Event} event |
- * @private |
- */ |
- onArcEnabledChange_: function(event) { |
- if (event.target.checked) { |
- /** @type {!SettingsCheckboxElement} */ (event.target).sendPrefChange(); |
- return; |
- } |
- this.$.confirmDisableDialog.showModal(); |
- }, |
- |
- /** |
- * Handles the shared proxy confirmation dialog 'Confirm' button. |
- * @private |
- */ |
- onConfirmDisableDialogConfirm_: function() { |
- /** @type {!SettingsCheckboxElement} */ (this.$.enabled).sendPrefChange(); |
- this.$.confirmDisableDialog.close(); |
- }, |
- |
- /** |
- * Handles the shared proxy confirmation dialog 'Cancel' button or a cancel |
- * event. |
- * @private |
- */ |
- onConfirmDisableDialogCancel_: function() { |
- /** @type {!SettingsCheckboxElement} */ (this.$.enabled).resetToPrefValue(); |
- this.$.confirmDisableDialog.close(); |
- }, |
- |
- /** |
- * @param {!Event} e |
- * @private |
- */ |
- stopPropagation_: function(e) { |
- e.stopPropagation(); |
+ onSubpageTap_: function() { |
+ if (this.androidAppsInfo_.appReady) |
+ settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS); |
}, |
}); |