summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorkhmel <khmel@chromium.org>2016-01-15 08:47:59 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-15 16:49:28 +0000
commitc7832694b699db4de8ce4165a15e07566413e4c9 (patch)
tree7fa74d256e2262751697f98524df7a2461c9085c /components
parentc155b7336036ec8cd92cecf5707afd64f37d82ef (diff)
downloadchromium_src-c7832694b699db4de8ce4165a15e07566413e4c9.zip
chromium_src-c7832694b699db4de8ce4165a15e07566413e4c9.tar.gz
chromium_src-c7832694b699db4de8ce4165a15e07566413e4c9.tar.bz2
app_launcher: Support install/remove ARC apps.
Add additional local prefs to keep state of ARC apps on local device. Implement filter that does not show ARC icons for unsynced ARC apps. Handle events for adding ARC apps and removing ARC packages. BUG=575020 BUG=567520 TEST=unit_tests passed TEST=Run ARC and install random apps from Play Store. New app icons appear in Chrome app launcher. Remove app using Settings/Apps. Icon disappear from Chrome app launcher. TEST=Install several unique ARC apps on first device. Login on second device. Chrome app launcher on second device does not show any icon for unique app from first device. Review URL: https://codereview.chromium.org/1562283002 Cr-Commit-Position: refs/heads/master@{#369770}
Diffstat (limited to 'components')
-rw-r--r--components/arc/common/app.mojom18
1 files changed, 14 insertions, 4 deletions
diff --git a/components/arc/common/app.mojom b/components/arc/common/app.mojom
index cc4b2e0..d3ad7a6 100644
--- a/components/arc/common/app.mojom
+++ b/components/arc/common/app.mojom
@@ -30,15 +30,25 @@ struct AppInfo {
interface AppHost {
// Receives a list of available ARC apps to Chrome. Members of AppInfo must
// contain non-empty string.
- OnAppListRefreshed(array<AppInfo> apps);
+ OnAppListRefreshed@0(array<AppInfo> apps);
+
+ // Sends newly added ARC app to Chrome. This message is sent when ARC receives
+ // package added notification. Multiple apps may be added in the one package.
+ [MinVersion=1] OnAppAdded@2(AppInfo app);
+
+ // Sends removed ARC package to Chrome. |package| must contain non-empty
+ // string. This message is sent when ARC receives package removed
+ // notification. Removing one package can potentially remove more than one
+ // app.
+ [MinVersion=1] OnPackageRemoved@3(string package);
// Receives an icon of required |scale_factor| for specific ARC app. The app
// is defined by |package| and |activity|. The icon content cannot be empty
// and must match to |scale_factor| assuming 48x48 for SCALE_FACTOR_100P.
// |scale_factor| is an enum defined at ui/base/layout.h. |icon_png_data| is
// a png-encoded image.
- OnAppIcon(string package, string activity,
- ScaleFactor scale_factor, array<uint8> icon_png_data);
+ OnAppIcon@1(string package, string activity,
+ ScaleFactor scale_factor, array<uint8> icon_png_data);
};
// TODO(lhchavez): Migrate all request/response messages to Mojo.
@@ -57,6 +67,6 @@ interface AppInstance {
// Sends a request to ARC for the ARC app icon of a required scale factor.
// Scale factor is an enum defined at ui/base/layout.h. App is defined by
- // package and activity, which cannot be empty.
+ // |package| and |activity|, which cannot be empty.
RequestAppIcon(string package, string activity, ScaleFactor scale_factor);
};