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

Unified Diff: base/android/java_handler_thread.cc

Issue 1476403003: jni: Pass method parameters as JavaParamRef in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary namespace qualifiers Created 5 years 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
« no previous file with comments | « base/android/java_handler_thread.h ('k') | base/android/jni_generator/sample_for_tests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java_handler_thread.cc
diff --git a/base/android/java_handler_thread.cc b/base/android/java_handler_thread.cc
index 93d45e32e5be5bd549afafa8a021974f0e67131e..0f410b6646a286598d5439a9e7a5923b59c3e450 100644
--- a/base/android/java_handler_thread.cc
+++ b/base/android/java_handler_thread.cc
@@ -55,7 +55,8 @@ void JavaHandlerThread::Stop() {
shutdown_event.Wait();
}
-void JavaHandlerThread::InitializeThread(JNIEnv* env, jobject obj,
+void JavaHandlerThread::InitializeThread(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
jlong event) {
// TYPE_JAVA to get the Android java style message loop.
message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_JAVA));
@@ -63,7 +64,9 @@ void JavaHandlerThread::InitializeThread(JNIEnv* env, jobject obj,
reinterpret_cast<base::WaitableEvent*>(event)->Signal();
}
-void JavaHandlerThread::StopThread(JNIEnv* env, jobject obj, jlong event) {
+void JavaHandlerThread::StopThread(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jlong event) {
static_cast<MessageLoopForUI*>(message_loop_.get())->QuitWhenIdle();
reinterpret_cast<base::WaitableEvent*>(event)->Signal();
}
« no previous file with comments | « base/android/java_handler_thread.h ('k') | base/android/jni_generator/sample_for_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698