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

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

Issue 1402533003: Don't use base::MessageLoop::{Quit,QuitClosure} in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "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 21 matching lines...) Expand all
32 32
33 static void RunUntilIdle(JNIEnv* env, 33 static void RunUntilIdle(JNIEnv* env,
34 const JavaParamRef<jobject>& jcaller, 34 const JavaParamRef<jobject>& jcaller,
35 jlong runLoopID) { 35 jlong runLoopID) {
36 reinterpret_cast<base::MessageLoop*>(runLoopID)->RunUntilIdle(); 36 reinterpret_cast<base::MessageLoop*>(runLoopID)->RunUntilIdle();
37 } 37 }
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)->Quit(); 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.obj());
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,
(...skipping 19 matching lines...) Expand all
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
81 81
OLDNEW
« no previous file with comments | « mojo/android/javatests/mojo_test_case.cc ('k') | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698