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

Side by Side Diff: base/android/java_handler_thread.h

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 unified diff | Download patch
« no previous file with comments | « no previous file | base/android/java_handler_thread.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef BASE_ANDROID_JAVA_HANDLER_THREAD_H_ 5 #ifndef BASE_ANDROID_JAVA_HANDLER_THREAD_H_
6 #define BASE_ANDROID_JAVA_HANDLER_THREAD_H_ 6 #define BASE_ANDROID_JAVA_HANDLER_THREAD_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 JavaHandlerThread(const char* name); 27 JavaHandlerThread(const char* name);
28 virtual ~JavaHandlerThread(); 28 virtual ~JavaHandlerThread();
29 29
30 base::MessageLoop* message_loop() const { return message_loop_.get(); } 30 base::MessageLoop* message_loop() const { return message_loop_.get(); }
31 void Start(); 31 void Start();
32 void Stop(); 32 void Stop();
33 33
34 // Called from java on the newly created thread. 34 // Called from java on the newly created thread.
35 // Start() will not return before this methods has finished. 35 // Start() will not return before this methods has finished.
36 void InitializeThread(JNIEnv* env, jobject obj, jlong event); 36 void InitializeThread(JNIEnv* env,
37 void StopThread(JNIEnv* env, jobject obj, jlong event); 37 const JavaParamRef<jobject>& obj,
38 jlong event);
39 void StopThread(JNIEnv* env,
40 const JavaParamRef<jobject>& obj,
41 jlong event);
38 42
39 static bool RegisterBindings(JNIEnv* env); 43 static bool RegisterBindings(JNIEnv* env);
40 44
41 private: 45 private:
42 scoped_ptr<base::MessageLoop> message_loop_; 46 scoped_ptr<base::MessageLoop> message_loop_;
43 ScopedJavaGlobalRef<jobject> java_thread_; 47 ScopedJavaGlobalRef<jobject> java_thread_;
44 }; 48 };
45 49
46 } // namespace android 50 } // namespace android
47 } // namespace base 51 } // namespace base
48 52
49 #endif // BASE_ANDROID_JAVA_HANDLER_THREAD_H_ 53 #endif // BASE_ANDROID_JAVA_HANDLER_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/android/java_handler_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698