Home | History | Annotate | Download | only in android
      1 // Copyright 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_ANDROID_JAVA_MESSAGE_HANDLER_FACTORY_H_
      6 #define BASE_ANDROID_JAVA_MESSAGE_HANDLER_FACTORY_H_
      7 
      8 #include "base/android/scoped_java_ref.h"
      9 #include "base/message_loop/message_pump.h"
     10 
     11 namespace base {
     12 
     13 class MessagePumpForUI;
     14 class WaitableEvent;
     15 
     16 namespace android {
     17 
     18 // Factory for creating the Java-side system message handler - only used for
     19 // testing.
     20 class JavaMessageHandlerFactory {
     21  public:
     22   virtual ~JavaMessageHandlerFactory() {}
     23   virtual base::android::ScopedJavaLocalRef<jobject> CreateMessageHandler(
     24       JNIEnv* env,
     25       base::MessagePump::Delegate* delegate,
     26       MessagePumpForUI* message_pump,
     27       WaitableEvent* test_done_event) = 0;
     28 };
     29 
     30 }  // namespace android
     31 }  // namespace base
     32 
     33 #endif  // BASE_ANDROID_JAVA_MESSAGE_HANDLER_FACTORY_H_
     34