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

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

Issue 2541923002: MD Settings: Add Google Play Store (Arc++) section (Closed)
Patch Set: Fix tests Created 4 years 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_browser_proxy.js
diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
new file mode 100644
index 0000000000000000000000000000000000000000..2fe9e78fcaca65b2d252cf6637eb08a08aaa5f6c
--- /dev/null
+++ b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
@@ -0,0 +1,58 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview A helper object used by the "Google Play Store" (Arc++) section
+ * to retrieve information about android apps.
+ */
+
+/**
+ * @typedef {{appReady: boolean}}
+ * @see chrome/browser/ui/webui/settings/chromeos/android_apps_handler.cc
+ */
+var AndroidAppsInfo;
+
+cr.define('settings', function() {
+ /** @interface */
+ function AndroidAppsBrowserProxy() {
+ }
+
+ AndroidAppsBrowserProxy.prototype = {
+ requestAndroidAppsInfo: function() {},
+
+ /**
+ * @param {boolean} keyboardAction True if the app was opened using a
+ * keyboard action.
+ */
+ showAndroidAppsSettings: function(keyboardAction) {},
+ };
+
+ /**
+ * @constructor
+ * @implements {settings.AndroidAppsBrowserProxy}
+ */
+ function AndroidAppsBrowserProxyImpl() {
+ }
+
+ // The singleton instance_ can be replaced with a test version of this wrapper
+ // during testing.
+ cr.addSingletonGetter(AndroidAppsBrowserProxyImpl);
+
+ AndroidAppsBrowserProxyImpl.prototype = {
+ /** @override */
+ requestAndroidAppsInfo: function() {
+ chrome.send('requestAndroidAppsInfo');
+ },
+
+ /** @override */
+ showAndroidAppsSettings: function(keyboardAction) {
+ chrome.send('showAndroidAppsSettings', [keyboardAction]);
+ },
+ };
+
+ return {
+ AndroidAppsBrowserProxy: AndroidAppsBrowserProxy,
+ AndroidAppsBrowserProxyImpl: AndroidAppsBrowserProxyImpl,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698