| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ | 6 #define CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Add a prerender with the given url and referrer on the PrerenderManager of | 29 // Add a prerender with the given url and referrer on the PrerenderManager of |
| 30 // the given profile. This is restricted to a single prerender at a time. | 30 // the given profile. This is restricted to a single prerender at a time. |
| 31 bool AddPrerender(JNIEnv* env, | 31 bool AddPrerender(JNIEnv* env, |
| 32 const base::android::JavaParamRef<jobject>& obj, | 32 const base::android::JavaParamRef<jobject>& obj, |
| 33 const base::android::JavaParamRef<jobject>& profile, | 33 const base::android::JavaParamRef<jobject>& profile, |
| 34 const base::android::JavaParamRef<jobject>& jweb_contents, | 34 const base::android::JavaParamRef<jobject>& jweb_contents, |
| 35 const base::android::JavaParamRef<jstring>& url, | 35 const base::android::JavaParamRef<jstring>& url, |
| 36 const base::android::JavaParamRef<jstring>& referrer, | 36 const base::android::JavaParamRef<jstring>& referrer, |
| 37 jint width, | 37 jint width, |
| 38 jint height); | 38 jint height, |
| 39 jboolean prerender_on_cellular); |
| 39 | 40 |
| 40 // Cancel the prerender associated with the prerender_handle_ | 41 // Cancel the prerender associated with the prerender_handle_ |
| 41 void CancelCurrentPrerender( | 42 void CancelCurrentPrerender( |
| 42 JNIEnv* env, | 43 JNIEnv* env, |
| 43 const base::android::JavaParamRef<jobject>& object); | 44 const base::android::JavaParamRef<jobject>& object); |
| 44 | 45 |
| 45 // Whether the PrerenderManager associated with the given profile has any | 46 // Whether the PrerenderManager associated with the given profile has any |
| 46 // prerenders for the url. | 47 // prerenders for the url. |
| 47 static bool HasPrerenderedUrl(Profile* profile, | 48 static bool HasPrerenderedUrl(Profile* profile, |
| 48 GURL url, | 49 GURL url, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 60 private: | 61 private: |
| 61 virtual ~ExternalPrerenderHandlerAndroid(); | 62 virtual ~ExternalPrerenderHandlerAndroid(); |
| 62 scoped_ptr<prerender::PrerenderHandle> prerender_handle_; | 63 scoped_ptr<prerender::PrerenderHandle> prerender_handle_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderHandlerAndroid); | 65 DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderHandlerAndroid); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace prerender | 68 } // namespace prerender |
| 68 | 69 |
| 69 #endif // CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ | 70 #endif // CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ |
| OLD | NEW |