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

Side by Side Diff: content/browser/android/interstitial_page_delegate_android.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/android/interstitial_page_delegate_android.h" 5 #include "content/browser/android/interstitial_page_delegate_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "content/public/browser/interstitial_page.h" 10 #include "content/public/browser/interstitial_page.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 base::android::ConvertUTF8ToJavaString(env, sanitized_command).obj()); 77 base::android::ConvertUTF8ToJavaString(env, sanitized_command).obj());
78 } 78 }
79 } 79 }
80 80
81 // static 81 // static
82 bool InterstitialPageDelegateAndroid 82 bool InterstitialPageDelegateAndroid
83 ::RegisterInterstitialPageDelegateAndroid(JNIEnv* env) { 83 ::RegisterInterstitialPageDelegateAndroid(JNIEnv* env) {
84 return RegisterNativesImpl(env); 84 return RegisterNativesImpl(env);
85 } 85 }
86 86
87 static jlong Init(JNIEnv* env, jobject obj, jstring html_content) { 87 static jlong Init(JNIEnv* env,
88 const JavaParamRef<jobject>& obj,
89 const JavaParamRef<jstring>& html_content) {
88 InterstitialPageDelegateAndroid* delegate = 90 InterstitialPageDelegateAndroid* delegate =
89 new InterstitialPageDelegateAndroid( 91 new InterstitialPageDelegateAndroid(
90 env, obj, base::android::ConvertJavaStringToUTF8(env, html_content)); 92 env, obj, base::android::ConvertJavaStringToUTF8(env, html_content));
91 return reinterpret_cast<intptr_t>(delegate); 93 return reinterpret_cast<intptr_t>(delegate);
92 } 94 }
93 95
94 } // namespace content 96 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/download_controller_android_impl.cc ('k') | content/browser/android/load_url_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698