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

Side by Side Diff: chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js

Issue 2873853002: arc: Handle ARC events in MD Settings (Closed)
Patch Set: attached/detached approach Created 3 years, 7 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 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-subpage' is the settings subpage for managing android apps. 7 * 'android-apps-subpage' is the settings subpage for managing android apps.
8 */ 8 */
9 9
10 Polymer({ 10 Polymer({
11 is: 'settings-android-apps-subpage', 11 is: 'settings-android-apps-subpage',
12 12
13 behaviors: [I18nBehavior, PrefsBehavior], 13 behaviors: [I18nBehavior, PrefsBehavior],
14 14
15 properties: { 15 properties: {
16 /** Preferences state. */ 16 /** Preferences state. */
17 prefs: Object, 17 prefs: Object,
18 18
19 /** @private {!AndroidAppsInfo|undefined} */ 19 /** @private {!AndroidAppsInfo|undefined} */
20 androidAppsInfo: Object, 20 androidAppsInfo: {
21 type: Object,
22 observer: 'onAndroidAppsInfoUpdate_',
23 },
21 24
22 /** @private */ 25 /** @private */
23 dialogBody_: { 26 dialogBody_: {
24 type: String, 27 type: String,
25 value: function() { 28 value: function() {
26 return this.i18nAdvanced( 29 return this.i18nAdvanced(
27 'androidAppsDisableDialogMessage', 30 'androidAppsDisableDialogMessage',
28 {substitutions: [], tags: ['br']}); 31 {substitutions: [], tags: ['br']});
29 } 32 }
30 } 33 }
31 }, 34 },
32 35
33 /** @private {?settings.AndroidAppsBrowserProxy} */ 36 /** @private {?settings.AndroidAppsBrowserProxy} */
34 browserProxy_: null, 37 browserProxy_: null,
35 38
36 /** @override */ 39 /** @override */
37 created: function() { 40 created: function() {
38 this.browserProxy_ = settings.AndroidAppsBrowserProxyImpl.getInstance(); 41 this.browserProxy_ = settings.AndroidAppsBrowserProxyImpl.getInstance();
39 }, 42 },
40 43
41 /** 44 /**
45 * @param {AndroidAppsInfo} info
46 * @private
47 */
48 onAndroidAppsInfoUpdate_: function() {
49 if (!this.androidAppsInfo.playStoreEnabled)
50 settings.navigateToPreviousRoute();
51 },
52
53 /**
42 * @param {Event} event 54 * @param {Event} event
43 * @private 55 * @private
44 */ 56 */
45 onManageAndroidAppsKeydown_: function(event) { 57 onManageAndroidAppsKeydown_: function(event) {
46 if (event.key != 'Enter' && event.key != ' ') 58 if (event.key != 'Enter' && event.key != ' ')
47 return; 59 return;
48 this.browserProxy_.showAndroidAppsSettings(true /** keyboardAction */); 60 this.browserProxy_.showAndroidAppsSettings(true /** keyboardAction */);
49 event.stopPropagation(); 61 event.stopPropagation();
50 }, 62 },
51 63
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 */ 101 */
90 onConfirmDisableDialogCancel_: function() { 102 onConfirmDisableDialogCancel_: function() {
91 this.$.confirmDisableDialog.close(); 103 this.$.confirmDisableDialog.close();
92 }, 104 },
93 105
94 /** @private */ 106 /** @private */
95 onConfirmDisableDialogClose_: function() { 107 onConfirmDisableDialogClose_: function() {
96 cr.ui.focusWithoutInk(assert(this.$$('#remove button'))); 108 cr.ui.focusWithoutInk(assert(this.$$('#remove button')));
97 }, 109 },
98 }); 110 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698