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

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

Issue 2873853002: arc: Handle ARC events in MD Settings (Closed)
Patch Set: fix annotations 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-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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 cr.addWebUIListener( 48 cr.addWebUIListener(
49 'android-apps-info-update', this.androidAppsInfoUpdate_.bind(this)); 49 'android-apps-info-update', this.androidAppsInfoUpdate_.bind(this));
50 this.browserProxy_.requestAndroidAppsInfo(); 50 this.browserProxy_.requestAndroidAppsInfo();
51 }, 51 },
52 /** 52 /**
53 * @param {AndroidAppsInfo} info 53 * @param {AndroidAppsInfo} info
54 * @private 54 * @private
55 */ 55 */
56 androidAppsInfoUpdate_: function(info) { 56 androidAppsInfoUpdate_: function(info) {
57 this.androidAppsInfo_ = info; 57 this.androidAppsInfo_ = info;
58 if (!this.androidAppsInfo_.playStoreEnabled) {
59 if (settings.getCurrentRoute() == settings.Route.ANDROID_APPS_DETAILS)
stevenjb 2017/05/10 16:47:03 Combine these ifs.
khmel 2017/05/10 21:48:12 Done.
60 settings.navigateTo(settings.Route.ANDROID_APPS);
stevenjb 2017/05/10 16:47:03 nit: settings.navigateToPreviousRoute();
khmel 2017/05/10 21:48:12 Done. My concern was what if user directly opens A
stevenjb 2017/05/10 22:35:44 In that case we would just return to the main Sett
61 }
58 }, 62 },
59 63
60 /** 64 /**
61 * @param {Event} event 65 * @param {Event} event
62 * @private 66 * @private
63 */ 67 */
64 onEnableTap_: function(event) { 68 onEnableTap_: function(event) {
65 this.setPrefValue('arc.enabled', true); 69 this.setPrefValue('arc.enabled', true);
66 event.stopPropagation(); 70 event.stopPropagation();
67 }, 71 },
68 72
69 /** @private */ 73 /** @private */
70 onSubpageTap_: function() { 74 onSubpageTap_: function() {
71 if (this.androidAppsInfo_.appReady) 75 if (this.androidAppsInfo_.playStoreEnabled)
72 settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS); 76 settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS);
73 }, 77 },
74 }); 78 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698