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

Side by Side Diff: shell/android/native_handler_thread.cc

Issue 2056563002: Roll base to 0032c8e1a72eb85d947d8df8de503caa62b4d0a8. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « shell/android/main.cc ('k') | testing/android/native_test/native_test_launcher.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 "shell/android/native_handler_thread.h" 5 #include "shell/android/native_handler_thread.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "jni/NativeHandlerThread_jni.h" 8 #include "jni/NativeHandlerThread_jni.h"
9 9
10 namespace shell { 10 namespace shell {
11 11
12 jlong CreateMessageLoop(JNIEnv* env, jobject jcaller) { 12 jlong CreateMessageLoop(JNIEnv* env, const JavaParamRef<jobject>& jcaller) {
13 scoped_ptr<base::MessageLoop> loop(new base::MessageLoopForUI); 13 scoped_ptr<base::MessageLoop> loop(new base::MessageLoopForUI);
14 base::MessageLoopForUI::current()->Start(); 14 base::MessageLoopForUI::current()->Start();
15 return reinterpret_cast<intptr_t>(loop.release()); 15 return reinterpret_cast<intptr_t>(loop.release());
16 } 16 }
17 17
18 void DeleteMessageLoop(JNIEnv* env, jobject jcaller, jlong message_loop) { 18 void DeleteMessageLoop(JNIEnv* env,
19 const JavaParamRef<jobject>& jcaller,
20 jlong message_loop) {
19 scoped_ptr<base::MessageLoop> loop( 21 scoped_ptr<base::MessageLoop> loop(
20 reinterpret_cast<base::MessageLoop*>(message_loop)); 22 reinterpret_cast<base::MessageLoop*>(message_loop));
21 loop->QuitNow(); 23 loop->QuitNow();
22 } 24 }
23 25
24 bool RegisterNativeHandlerThreadJni(JNIEnv* env) { 26 bool RegisterNativeHandlerThreadJni(JNIEnv* env) {
25 return RegisterNativesImpl(env); 27 return RegisterNativesImpl(env);
26 } 28 }
27 29
28 } // namespace shell 30 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/main.cc ('k') | testing/android/native_test/native_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698