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

Side by Side Diff: chrome/browser/prerender/external_prerender_handler_android.h

Issue 2259533003: Use bounds instead of size for prerender requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile 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
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 17 matching lines...) Expand all
28 ExternalPrerenderHandlerAndroid(); 28 ExternalPrerenderHandlerAndroid();
29 29
30 // Add a prerender with the given url and referrer on the PrerenderManager of 30 // Add a prerender with the given url and referrer on the PrerenderManager of
31 // the given profile. This is restricted to a single prerender at a time. 31 // the given profile. This is restricted to a single prerender at a time.
32 bool AddPrerender(JNIEnv* env, 32 bool AddPrerender(JNIEnv* env,
33 const base::android::JavaParamRef<jobject>& obj, 33 const base::android::JavaParamRef<jobject>& obj,
34 const base::android::JavaParamRef<jobject>& profile, 34 const base::android::JavaParamRef<jobject>& profile,
35 const base::android::JavaParamRef<jobject>& jweb_contents, 35 const base::android::JavaParamRef<jobject>& jweb_contents,
36 const base::android::JavaParamRef<jstring>& url, 36 const base::android::JavaParamRef<jstring>& url,
37 const base::android::JavaParamRef<jstring>& referrer, 37 const base::android::JavaParamRef<jstring>& referrer,
38 jint width, 38 jint top,
39 jint height, 39 jint left,
40 jint bottom,
41 jint right,
40 jboolean prerender_on_cellular); 42 jboolean prerender_on_cellular);
41 43
42 // Cancel the prerender associated with the prerender_handle_ 44 // Cancel the prerender associated with the prerender_handle_
43 void CancelCurrentPrerender( 45 void CancelCurrentPrerender(
44 JNIEnv* env, 46 JNIEnv* env,
45 const base::android::JavaParamRef<jobject>& object); 47 const base::android::JavaParamRef<jobject>& object);
46 48
47 // Whether the PrerenderManager associated with the given profile has any 49 // Whether the PrerenderManager associated with the given profile has any
48 // prerenders for the url. 50 // prerenders for the url.
49 static bool HasPrerenderedUrl(Profile* profile, 51 static bool HasPrerenderedUrl(Profile* profile,
(...skipping 12 matching lines...) Expand all
62 private: 64 private:
63 virtual ~ExternalPrerenderHandlerAndroid(); 65 virtual ~ExternalPrerenderHandlerAndroid();
64 std::unique_ptr<prerender::PrerenderHandle> prerender_handle_; 66 std::unique_ptr<prerender::PrerenderHandle> prerender_handle_;
65 67
66 DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderHandlerAndroid); 68 DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderHandlerAndroid);
67 }; 69 };
68 70
69 } // namespace prerender 71 } // namespace prerender
70 72
71 #endif // CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_ 73 #endif // CHROME_BROWSER_PRERENDER_EXTERNAL_PRERENDER_HANDLER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698