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

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

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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 | « base/android/application_status_listener_unittest.cc ('k') | base/android/record_histogram.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 <memory>
11
10 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
11 #include "base/memory/scoped_ptr.h"
12 13
13 namespace base { 14 namespace base {
14 15
15 class MessageLoop; 16 class MessageLoop;
16 class WaitableEvent; 17 class WaitableEvent;
17 18
18 namespace android { 19 namespace android {
19 20
20 // A Java Thread with a native message loop. To run tasks, post them 21 // A Java Thread with a native message loop. To run tasks, post them
21 // to the message loop and they will be scheduled along with Java tasks 22 // to the message loop and they will be scheduled along with Java tasks
(...skipping 14 matching lines...) Expand all
36 void InitializeThread(JNIEnv* env, 37 void InitializeThread(JNIEnv* env,
37 const JavaParamRef<jobject>& obj, 38 const JavaParamRef<jobject>& obj,
38 jlong event); 39 jlong event);
39 void StopThread(JNIEnv* env, 40 void StopThread(JNIEnv* env,
40 const JavaParamRef<jobject>& obj, 41 const JavaParamRef<jobject>& obj,
41 jlong event); 42 jlong event);
42 43
43 static bool RegisterBindings(JNIEnv* env); 44 static bool RegisterBindings(JNIEnv* env);
44 45
45 private: 46 private:
46 scoped_ptr<base::MessageLoop> message_loop_; 47 std::unique_ptr<base::MessageLoop> message_loop_;
47 ScopedJavaGlobalRef<jobject> java_thread_; 48 ScopedJavaGlobalRef<jobject> java_thread_;
48 }; 49 };
49 50
50 } // namespace android 51 } // namespace android
51 } // namespace base 52 } // namespace base
52 53
53 #endif // BASE_ANDROID_JAVA_HANDLER_THREAD_H_ 54 #endif // BASE_ANDROID_JAVA_HANDLER_THREAD_H_
OLDNEW
« no previous file with comments | « base/android/application_status_listener_unittest.cc ('k') | base/android/record_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698