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

Side by Side Diff: chrome/browser/android/contextualsearch/contextual_search_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/android/contextualsearch/contextual_search_manager.h" 5 #include "chrome/browser/android/contextualsearch/contextual_search_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 base::android::ConvertUTF16ToJavaString(env, surrounding_text.c_str()); 139 base::android::ConvertUTF16ToJavaString(env, surrounding_text.c_str());
140 Java_ContextualSearchManager_onIcingSelectionAvailable( 140 Java_ContextualSearchManager_onIcingSelectionAvailable(
141 env, java_manager_.obj(), j_encoding.obj(), j_surrounding_text.obj(), 141 env, java_manager_.obj(), j_encoding.obj(), j_surrounding_text.obj(),
142 start_offset, end_offset); 142 start_offset, end_offset);
143 } 143 }
144 144
145 bool RegisterContextualSearchManager(JNIEnv* env) { 145 bool RegisterContextualSearchManager(JNIEnv* env) {
146 return RegisterNativesImpl(env); 146 return RegisterNativesImpl(env);
147 } 147 }
148 148
149 jlong Init(JNIEnv* env, jobject obj) { 149 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
150 ContextualSearchManager* manager = new ContextualSearchManager(env, obj); 150 ContextualSearchManager* manager = new ContextualSearchManager(env, obj);
151 return reinterpret_cast<intptr_t>(manager); 151 return reinterpret_cast<intptr_t>(manager);
152 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698