Index: base/test/android/java_handler_thread_for_testing.h |
diff --git a/base/test/android/java_handler_thread_for_testing.h b/base/test/android/java_handler_thread_for_testing.h |
index bb3bb98cfea945018e00d66d9e1546ea4a16073d..598c53f8fa47b4043f74489f6fefc5490259083e 100644 |
--- a/base/test/android/java_handler_thread_for_testing.h |
+++ b/base/test/android/java_handler_thread_for_testing.h |
@@ -5,6 +5,8 @@ |
#ifndef BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_ |
#define BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_ |
+#include <memory> |
+ |
#include "base/android/java_handler_thread.h" |
#include "base/android/java_message_handler_factory.h" |
#include "base/message_loop/message_loop.h" |
@@ -36,14 +38,21 @@ class TestJavaMessageHandlerFactory : public JavaMessageHandlerFactory { |
// instead. |
class JavaHandlerThreadForTesting : public JavaHandlerThread { |
public: |
- JavaHandlerThreadForTesting(const char* name, |
- base::WaitableEvent* test_done_event); |
+ static std::unique_ptr<JavaHandlerThreadForTesting> Create( |
+ const char* name, |
+ base::WaitableEvent* test_done_event); |
+ static std::unique_ptr<JavaHandlerThreadForTesting> CreateJavaFirst( |
gab
2017/03/29 18:14:04
Add comments
boliu
2017/03/29 18:30:07
Done.
|
+ base::WaitableEvent* test_done_event); |
~JavaHandlerThreadForTesting() override; |
gab
2017/03/29 18:14:04
Destructor goes first since these are no longer co
boliu
2017/03/29 18:30:07
Done.
|
void StartMessageLoop() override; |
void StopMessageLoop() override; |
private: |
+ JavaHandlerThreadForTesting(const char* name, |
+ base::WaitableEvent* test_done_event); |
+ explicit JavaHandlerThreadForTesting(base::WaitableEvent* test_done_event); |
+ |
std::unique_ptr<JavaMessageHandlerFactory> message_handler_factory_; |
base::WaitableEvent* test_done_event_; |
}; |