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

Unified Diff: chrome/browser/prerender/external_prerender_handler_android.cc

Issue 831523005: Remove most native WebContents references from Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kept same error checking behavior for aw_contents.cc Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/external_prerender_handler_android.cc
diff --git a/chrome/browser/prerender/external_prerender_handler_android.cc b/chrome/browser/prerender/external_prerender_handler_android.cc
index 0be6463ba3648dfb07a515cc9600b647246d582d..7fa069dd24bc379477d03bb63389f71046ffcf59 100644
--- a/chrome/browser/prerender/external_prerender_handler_android.cc
+++ b/chrome/browser/prerender/external_prerender_handler_android.cc
@@ -25,7 +25,7 @@ namespace prerender {
bool ExternalPrerenderHandlerAndroid::AddPrerender(JNIEnv* env,
jobject obj,
jobject jprofile,
- jlong web_contents_ptr,
+ jobject jweb_contents,
jstring jurl,
jstring jreferrer,
jint width,
@@ -45,7 +45,7 @@ bool ExternalPrerenderHandlerAndroid::AddPrerender(JNIEnv* env,
if (!prerender_manager)
return false;
content::WebContents* web_contents =
- reinterpret_cast<content::WebContents*>(web_contents_ptr);
+ content::WebContents::FromJavaWebContents(jweb_contents);
if (prerender_handle_.get()) {
prerender_handle_->OnNavigateAway();
}
@@ -72,7 +72,7 @@ static jboolean HasPrerenderedUrl(JNIEnv* env,
jclass clazz,
jobject jprofile,
jstring jurl,
- jlong web_contents_ptr) {
+ jobject jweb_contents) {
if (jurl == NULL)
return false;
@@ -85,7 +85,7 @@ static jboolean HasPrerenderedUrl(JNIEnv* env,
if (!prerender_manager)
return false;
content::WebContents* web_contents =
- reinterpret_cast<content::WebContents*>(web_contents_ptr);
+ content::WebContents::FromJavaWebContents(jweb_contents);
return prerender_manager->HasPrerenderedUrl(url, web_contents);
}

Powered by Google App Engine
This is Rietveld 408576698