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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/banners/AppData.java

Issue 156343002: Let AppBannerManager really create and manage banners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Piling on more changes from Android UX requests Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/banners/AppData.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/banners/AppData.java b/chrome/android/java/src/org/chromium/chrome/browser/banners/AppData.java
new file mode 100644
index 0000000000000000000000000000000000000000..6b8e63e365eb72a76357d92328efa2060542933a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/banners/AppData.java
@@ -0,0 +1,51 @@
+// Copyright 2014 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.
+
+package org.chromium.chrome.browser.banners;
+
+import android.app.PendingIntent;
+import android.graphics.drawable.Drawable;
+
+/**
+ * Stores information about a particular app.
+ */
+public class AppData {
+ // Installation states.
+ static final int INSTALL_STATE_NOT_INSTALLED = 0;
+ static final int INSTALL_STATE_INSTALLING = 1;
+ static final int INSTALL_STATE_INSTALLED = 2;
+
+ // URL for the website displaying the banner.
+ public String siteUrl;
+
+ // Play store package name for the app.
+ public String packageName;
+
+ // Title of the app.
+ public String title;
+
+ // URL for the app icon.
+ public String imageUrl;
+
+ // Drawable containing the app icon.
+ public Drawable icon;
+
+ // Rating.
+ public float rating;
+
+ // Text to display on the install button.
+ public String installButtonText;
+
+ // Intent that triggers the Play store page.
+ public PendingIntent detailsIntent;
+
+ // Intent that triggers installation.
+ public PendingIntent installIntent;
+
+ // State of the install.
+ public int installState = INSTALL_STATE_NOT_INSTALLED;
+
+ // Task that watches the package manager for installation progress.
+ public InstallerDelegate installTask;
+}

Powered by Google App Engine
This is Rietveld 408576698