| Index: chrome/browser/predictors/resource_prefetch_predictor_android.h
|
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor_android.h b/chrome/browser/predictors/resource_prefetch_predictor_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c77bf41b00e92b42f6bc43b9f76e5dd95487fc42
|
| --- /dev/null
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor_android.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_ANDROID_H_
|
| +#define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_ANDROID_H_
|
| +
|
| +#include <jni.h>
|
| +
|
| +#include "base/macros.h"
|
| +
|
| +class Profile;
|
| +
|
| +namespace base {
|
| +namespace android {
|
| +template <typename T>
|
| +class JavaParamRef;
|
| +} // namespace android
|
| +} // namespace base
|
| +
|
| +namespace predictors {
|
| +
|
| +class ResourcePrefetchPredictor;
|
| +
|
| +class ResourcePrefetchPredictorAndroid {
|
| + public:
|
| + // See ResourcePrefetchPredictor::StartPrefetching().
|
| + void StartPrefetching(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + const base::android::JavaParamRef<jstring>& j_url);
|
| + // See ResourcePrefetchPredictor::StopPrefetching().
|
| + void StopPrefetching(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + const base::android::JavaParamRef<jstring>& j_url);
|
| +
|
| + // Returns a pointer to a new instance of |ResourePrefetchPredictorAndroid|,
|
| + // for a given profile.
|
| + static jlong GetForProfile(JNIEnv* env, jclass clazz, jobject j_profile);
|
| + static bool Register(JNIEnv* env);
|
| +
|
| + private:
|
| + explicit ResourcePrefetchPredictorAndroid(Profile* profile);
|
| +
|
| + Profile* profile_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorAndroid);
|
| +};
|
| +
|
| +} // namespace predictors
|
| +
|
| +#endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_ANDROID_H_
|
|
|