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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java

Issue 2156113002: Replace AppBannerDataFetcher with InstallableManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@banner-refactor
Patch Set: Naming, includes Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.content.Context; 7 import android.content.Context;
8 import android.text.TextUtils; 8 import android.text.TextUtils;
9 9
10 import org.chromium.base.ContextUtils; 10 import org.chromium.base.ContextUtils;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 static void disableSecureSchemeCheckForTesting() { 145 static void disableSecureSchemeCheckForTesting() {
146 nativeDisableSecureSchemeCheckForTesting(); 146 nativeDisableSecureSchemeCheckForTesting();
147 } 147 }
148 148
149 /** Sets the weights of direct and indirect page navigations for testing. */ 149 /** Sets the weights of direct and indirect page navigations for testing. */
150 @VisibleForTesting 150 @VisibleForTesting
151 static void setEngagementWeights(double directEngagement, double indirectEng agement) { 151 static void setEngagementWeights(double directEngagement, double indirectEng agement) {
152 nativeSetEngagementWeights(directEngagement, indirectEngagement); 152 nativeSetEngagementWeights(directEngagement, indirectEngagement);
153 } 153 }
154 154
155 /** Returns whether an AppBannerDataFetcher is actively retrieving data. */ 155 /** Returns whether the native AppBannerManager is working. */
156 @VisibleForTesting 156 @VisibleForTesting
157 public boolean isFetcherActiveForTesting() { 157 public boolean isActiveForTesting() {
158 return nativeIsFetcherActive(mNativePointer); 158 return nativeIsActiveForTesting(mNativePointer);
159 } 159 }
160 160
161 /** Returns the AppBannerManager object. This is owned by the C++ banner man ager. */ 161 /** Returns the AppBannerManager object. This is owned by the C++ banner man ager. */
162 public static AppBannerManager getAppBannerManagerForWebContents(WebContents webContents) { 162 public static AppBannerManager getAppBannerManagerForWebContents(WebContents webContents) {
163 return nativeGetJavaBannerManagerForWebContents(webContents); 163 return nativeGetJavaBannerManagerForWebContents(webContents);
164 } 164 }
165 165
166 private static native AppBannerManager nativeGetJavaBannerManagerForWebConte nts( 166 private static native AppBannerManager nativeGetJavaBannerManagerForWebConte nts(
167 WebContents webContents); 167 WebContents webContents);
168 private native boolean nativeOnAppDetailsRetrieved(long nativeAppBannerManag erAndroid, 168 private native boolean nativeOnAppDetailsRetrieved(long nativeAppBannerManag erAndroid,
169 AppData data, String title, String packageName, String imageUrl); 169 AppData data, String title, String packageName, String imageUrl);
170 170
171 // Testing methods. 171 // Testing methods.
172 private static native void nativeSetTimeDeltaForTesting(int days); 172 private static native void nativeSetTimeDeltaForTesting(int days);
173 private static native void nativeDisableSecureSchemeCheckForTesting(); 173 private static native void nativeDisableSecureSchemeCheckForTesting();
174 private static native void nativeSetEngagementWeights(double directEngagemen t, 174 private static native void nativeSetEngagementWeights(double directEngagemen t,
175 double indirectEngagement); 175 double indirectEngagement);
176 private native boolean nativeIsFetcherActive(long nativeAppBannerManagerAndr oid); 176 private native boolean nativeIsActiveForTesting(long nativeAppBannerManagerA ndroid);
177 } 177 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698