OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.chrome.browser.banners; | 5 package org.chromium.chrome.browser.banners; |
6 | 6 |
7 import android.app.PendingIntent; | 7 import android.app.PendingIntent; |
8 | 8 |
9 /** | 9 /** |
10 * Stores information about a particular app. | 10 * Stores information about a particular app. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 */ | 87 */ |
88 public PendingIntent detailsIntent() { | 88 public PendingIntent detailsIntent() { |
89 return mDetailsIntent; | 89 return mDetailsIntent; |
90 } | 90 } |
91 | 91 |
92 /** | 92 /** |
93 * Returns the PendingIntent that triggers the install. | 93 * Returns the PendingIntent that triggers the install. |
94 * The IntentSender stored inside dictates what package needs to be launched
. | 94 * The IntentSender stored inside dictates what package needs to be launched
. |
95 * @return PendingIntent used to trigger the install. | 95 * @return PendingIntent used to trigger the install. |
96 */ | 96 */ |
97 PendingIntent installIntent() { | 97 public PendingIntent installIntent() { |
98 return mInstallIntent; | 98 return mInstallIntent; |
99 } | 99 } |
100 | 100 |
101 /** | 101 /** |
102 * Stores all of the data about the given app after it's been retrieved. | 102 * Stores all of the data about the given app after it's been retrieved. |
103 * @param title App title. | 103 * @param title App title. |
104 * @param imageUrl URL where the icon is located. | 104 * @param imageUrl URL where the icon is located. |
105 * @param rating Rating of the app. | 105 * @param rating Rating of the app. |
106 * @param installButtonText Text to display on the install button if it's no
t installed yet. | 106 * @param installButtonText Text to display on the install button if it's no
t installed yet. |
107 * @param detailsIntent Intent to fire to launch the details page for th
e app | 107 * @param detailsIntent Intent to fire to launch the details page for th
e app |
108 * @param installIntent Intent to fire to trigger the purchase/install p
rocess. | 108 * @param installIntent Intent to fire to trigger the purchase/install p
rocess. |
109 */ | 109 */ |
110 public void setPackageInfo(String title, String imageUrl, float rating, | 110 public void setPackageInfo(String title, String imageUrl, float rating, |
111 String installButtonText, PendingIntent detailsIntent, PendingIntent
installIntent) { | 111 String installButtonText, PendingIntent detailsIntent, PendingIntent
installIntent) { |
112 mTitle = title; | 112 mTitle = title; |
113 mImageUrl = imageUrl; | 113 mImageUrl = imageUrl; |
114 mRating = rating; | 114 mRating = rating; |
115 mInstallButtonText = installButtonText; | 115 mInstallButtonText = installButtonText; |
116 mDetailsIntent = detailsIntent; | 116 mDetailsIntent = detailsIntent; |
117 mInstallIntent = installIntent; | 117 mInstallIntent = installIntent; |
118 } | 118 } |
119 } | 119 } |
OLD | NEW |