#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_
#include <jni.h>
#include "base/android/scoped_java_ref.h"
#include "base/base_export.h"
#include "base/compiler_specific.h"
#include "base/message_loop/message_pump.h"
namespace base {
class RunLoop;
class TimeTicks;
class BASE_EXPORT MessagePumpForUI : public MessagePump {
 public:
  MessagePumpForUI();
  virtual ~MessagePumpForUI();
  virtual void Run(Delegate* delegate) OVERRIDE;
  virtual void Quit() OVERRIDE;
  virtual void ScheduleWork() OVERRIDE;
  virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
  virtual void Start(Delegate* delegate);
  static bool RegisterBindings(JNIEnv* env);
 private:
  RunLoop* run_loop_;
  base::android::ScopedJavaGlobalRef<jobject> system_message_handler_obj_;
  DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
};
}  
#endif