Chromium Code Reviews| 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.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 Loading... | |
| 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 an AppBannerDataFetcher is actively retrieving data. */ |
|
gone
2016/07/23 23:39:22
Comment should be updated.
dominickn
2016/07/25 00:23:51
Done.
| |
| 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 } |
| OLD | NEW |