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

Side by Side Diff: mojo/android/system/base_run_loop.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( 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
« no previous file with comments | « mojo/android/javatests/validation_test_util.cc ('k') | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/android/system/base_run_loop.h" 5 #include "mojo/android/system/base_run_loop.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/base_jni_registrar.h" 9 #include "base/android/base_jni_registrar.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 27 matching lines...) Expand all
38 38
39 static void Quit(JNIEnv* env, 39 static void Quit(JNIEnv* env,
40 const JavaParamRef<jobject>& jcaller, 40 const JavaParamRef<jobject>& jcaller,
41 jlong runLoopID) { 41 jlong runLoopID) {
42 reinterpret_cast<base::MessageLoop*>(runLoopID)->QuitWhenIdle(); 42 reinterpret_cast<base::MessageLoop*>(runLoopID)->QuitWhenIdle();
43 } 43 }
44 44
45 static void RunJavaRunnable( 45 static void RunJavaRunnable(
46 const base::android::ScopedJavaGlobalRef<jobject>& runnable_ref) { 46 const base::android::ScopedJavaGlobalRef<jobject>& runnable_ref) {
47 Java_BaseRunLoop_runRunnable(base::android::AttachCurrentThread(), 47 Java_BaseRunLoop_runRunnable(base::android::AttachCurrentThread(),
48 runnable_ref.obj()); 48 runnable_ref);
49 } 49 }
50 50
51 static void PostDelayedTask(JNIEnv* env, 51 static void PostDelayedTask(JNIEnv* env,
52 const JavaParamRef<jobject>& jcaller, 52 const JavaParamRef<jobject>& jcaller,
53 jlong runLoopID, 53 jlong runLoopID,
54 const JavaParamRef<jobject>& runnable, 54 const JavaParamRef<jobject>& runnable,
55 jlong delay) { 55 jlong delay) {
56 base::android::ScopedJavaGlobalRef<jobject> runnable_ref; 56 base::android::ScopedJavaGlobalRef<jobject> runnable_ref;
57 // ScopedJavaGlobalRef do not hold onto the env reference, so it is safe to 57 // ScopedJavaGlobalRef do not hold onto the env reference, so it is safe to
58 // use it across threads. |RunJavaRunnable| will acquire a new JNIEnv before 58 // use it across threads. |RunJavaRunnable| will acquire a new JNIEnv before
(...skipping 12 matching lines...) Expand all
71 delete message_loop; 71 delete message_loop;
72 } 72 }
73 73
74 bool RegisterBaseRunLoop(JNIEnv* env) { 74 bool RegisterBaseRunLoop(JNIEnv* env) {
75 return RegisterNativesImpl(env); 75 return RegisterNativesImpl(env);
76 } 76 }
77 77
78 } // namespace android 78 } // namespace android
79 } // namespace mojo 79 } // namespace mojo
80 80
OLDNEW
« no previous file with comments | « mojo/android/javatests/validation_test_util.cc ('k') | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698