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

Unified Diff: chrome/browser/resources/settings/android_apps_page/android_apps_page.js

Issue 2785013003: MD Settings: Google Play Store: Add subpage and polish (Closed)
Patch Set: Restore some strings Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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..a985566431219f803d9e4417dd5974155d5653c2 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
@@ -43,69 +45,27 @@ Polymer({
this.androidAppsInfo_ = info;
},
+ /** @return {string} */
+ getSubtext_: function() {
+ // TODO(stevenjb): Change the text when appReady to 'toggleOn' or whatever
+ // UX finally decides on. Discussion in crbug.com/698463.
+ return this.androidAppsInfo_.appReady ? this.i18n('androidAppsSubtext') :
Dan Beam 2017/04/04 21:57:14 should this be 'toggleOn'?
+ this.i18n('androidAppsSubtext');
Dan Beam 2017/04/04 21:57:14 whoops
+ },
+
/**
* @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();
+ onSubpageTap_: function() {
+ if (!this.androidAppsInfo_.appReady)
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();
+ settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS);
},
});

Powered by Google App Engine
This is Rietveld 408576698