Speculative fix for the white/stale tab issue on Windows.
[chromium-blink-merge.git] / base / message_pump_android.h
blob5ef4bd6920380a9f8daeea197807a27f19dc1c08
1 // Copyright (c) 2012 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.
5 #ifndef BASE_MESSAGE_PUMP_ANDROID_H_
6 #define BASE_MESSAGE_PUMP_ANDROID_H_
8 #include <jni.h>
10 #include "base/base_export.h"
11 #include "base/compiler_specific.h"
12 #include "base/message_pump.h"
14 namespace base {
16 class RunLoop;
17 class TimeTicks;
19 // This class implements a MessagePump needed for TYPE_UI MessageLoops on
20 // OS_ANDROID platform.
21 class BASE_EXPORT MessagePumpForUI : public MessagePump {
22 public:
23 MessagePumpForUI();
25 virtual void Run(Delegate* delegate) OVERRIDE;
26 virtual void Quit() OVERRIDE;
27 virtual void ScheduleWork() OVERRIDE;
28 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
30 virtual void Start(Delegate* delegate);
32 static bool RegisterBindings(JNIEnv* env);
34 protected:
35 virtual ~MessagePumpForUI();
37 private:
38 base::RunLoop* run_loop_;
40 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
43 } // namespace base
45 #endif // BASE_MESSAGE_PUMP_ANDROID_H_