Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview A helper object used by the "Google Play Store" (Arc++) section | |
| 7 * to retrieve information about android apps. | |
| 8 */ | |
| 9 | |
| 10 /** | |
| 11 * @typedef {{appReady: boolean}} | |
| 12 * @see chrome/browser/ui/webui/settings/chromeos/android_apps_handler.cc | |
| 13 */ | |
| 14 var AndroidAppsInfo; | |
| 15 | |
| 16 cr.define('settings', function() { | |
| 17 /** @interface */ | |
| 18 function AndroidAppsBrowserProxy() { | |
|
michaelpg
2016/12/01 20:15:34
opt nit: } on same line
stevenjb
2016/12/02 00:39:19
I got pushback from other reviewers for doing that
| |
| 19 } | |
| 20 | |
| 21 AndroidAppsBrowserProxy.prototype = { | |
| 22 /** @return {!Promise<!AndroidAppsInfo>} */ | |
| 23 getAndroidAppsInfo: function() {}, | |
| 24 | |
| 25 showAndroidAppsSettings: function() {}, | |
| 26 }; | |
| 27 | |
| 28 /** | |
| 29 * @constructor | |
| 30 * @implements {settings.AndroidAppsBrowserProxy} | |
| 31 */ | |
| 32 function AndroidAppsBrowserProxyImpl() { | |
|
michaelpg
2016/12/01 20:15:34
same nit, also add a blank line between this and t
stevenjb
2016/12/02 00:39:19
Done.
| |
| 33 } | |
| 34 // The singleton instance_ can be replaced with a test version of this wrapper | |
| 35 // during testing. | |
| 36 cr.addSingletonGetter(AndroidAppsBrowserProxyImpl); | |
| 37 | |
| 38 AndroidAppsBrowserProxyImpl.prototype = { | |
| 39 /** @override */ | |
| 40 getAndroidAppsInfo: function() { | |
| 41 return cr.sendWithPromise('getAndroidAppsInfo'); | |
| 42 }, | |
| 43 | |
| 44 /** @override */ | |
| 45 showAndroidAppsSettings: function() { | |
| 46 chrome.send('showAndroidAppsSettings'); | |
| 47 }, | |
| 48 }; | |
| 49 | |
| 50 return { | |
| 51 AndroidAppsBrowserProxy: AndroidAppsBrowserProxy, | |
| 52 AndroidAppsBrowserProxyImpl: AndroidAppsBrowserProxyImpl, | |
| 53 }; | |
| 54 }); | |
| OLD | NEW |