Fix build break
[chromium-blink-merge.git] / content / test / browser_test_message_pump_android.h
blobd19b4494effc531f62f144da39d3b86f4823f674
1 // Copyright (c) 2013 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 CONTENT_TEST_BROWSER_TEST_MESSAGE_PUMP_ANDROID_
6 #define CONTENT_TEST_BROWSER_TEST_MESSAGE_PUMP_ANDROID_
8 #include "base/android/jni_android.h"
9 #include "base/compiler_specific.h"
10 #include "base/message_pump_android.h"
12 namespace content {
14 // MessgePump to be used for content browsertests on Android.
15 // This overrides the default ui message pump to allow nested loops.
16 class BrowserTestMessagePumpAndroid : public base::MessagePumpForUI {
17 public:
18 BrowserTestMessagePumpAndroid();
20 virtual void Run(Delegate* delegate) OVERRIDE;
21 virtual void Quit() OVERRIDE;
22 virtual void ScheduleWork() OVERRIDE;
23 virtual void ScheduleDelayedWork(
24 const base::TimeTicks& delayed_work_time) OVERRIDE;
25 virtual void Start(Delegate* delegate) OVERRIDE;
27 static bool RegisterJni(JNIEnv* env);
29 protected:
30 virtual ~BrowserTestMessagePumpAndroid();
32 private:
33 // We may make recursive calls to Run, so we save state that needs to be
34 // separate between them in this structure type.
35 struct RunState;
37 RunState* state_;
39 DISALLOW_COPY_AND_ASSIGN(BrowserTestMessagePumpAndroid);
42 } // namespace content
44 #endif // CONTENT_TEST_BROWSER_TEST_MESSAGE_PUMP_ANDROID_