OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H |
| 6 #define BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H |
| 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/message_loop/message_pump.h" |
| 12 |
| 13 namespace base { |
| 14 |
| 15 class MessagePumpForUI; |
| 16 class WaitableEvent; |
| 17 |
| 18 /** |
| 19 * This provides a link to (a way to create) the java-side |
| 20 * TestSystemMessageHandler class. |
| 21 */ |
| 22 class TestSystemMessageHandlerLink { |
| 23 private: |
| 24 friend class MessagePumpForUI; |
| 25 |
| 26 TestSystemMessageHandlerLink() = delete; |
| 27 ~TestSystemMessageHandlerLink() = delete; |
| 28 |
| 29 static base::android::ScopedJavaLocalRef<jobject> |
| 30 createTestSystemMessageHandler(JNIEnv* env, |
| 31 base::MessagePump::Delegate* delegate, |
| 32 MessagePumpForUI* message_pump, |
| 33 WaitableEvent* test_event); |
| 34 |
| 35 static bool RegisterJNI(JNIEnv* env); |
| 36 }; |
| 37 |
| 38 } // namespace base |
| 39 |
| 40 #endif // BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H |
OLD | NEW |