NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / ui / base / test / ui_controls_aura.h
blob22249442ad99ab6456da2abeeab4495ee63bb01d
1 // Copyright 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 UI_TEST_BASE_UI_CONTROLS_AURA_H_
6 #define UI_TEST_BASE_UI_CONTROLS_AURA_H_
8 #include "base/callback_forward.h"
9 #include "ui/base/test/ui_controls.h"
10 #include "ui/events/keycodes/keyboard_codes.h"
11 #include "ui/gfx/native_widget_types.h"
13 namespace ui_controls {
15 // An interface to provide Aura implementation of UI control.
16 class UIControlsAura {
17 public:
18 UIControlsAura();
19 virtual ~UIControlsAura();
21 virtual bool SendKeyPress(gfx::NativeWindow window,
22 ui::KeyboardCode key,
23 bool control,
24 bool shift,
25 bool alt,
26 bool command) = 0;
27 virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
28 ui::KeyboardCode key,
29 bool control,
30 bool shift,
31 bool alt,
32 bool command,
33 const base::Closure& task) = 0;
35 // Simulate a mouse move. (x,y) are absolute screen coordinates.
36 virtual bool SendMouseMove(long x, long y) = 0;
37 virtual bool SendMouseMoveNotifyWhenDone(long x,
38 long y,
39 const base::Closure& task) = 0;
41 // Sends a mouse down and/or up message. The click will be sent to wherever
42 // the cursor currently is, so be sure to move the cursor before calling this
43 // (and be sure the cursor has arrived!).
44 virtual bool SendMouseEvents(MouseButton type, int state) =0;
45 virtual bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
46 const base::Closure& task) = 0;
47 // Same as SendMouseEvents with BUTTON_UP | BUTTON_DOWN.
48 virtual bool SendMouseClick(MouseButton type) = 0;
50 // Runs |closure| after processing all pending ui events.
51 virtual void RunClosureAfterAllPendingUIEvents(
52 const base::Closure& closure) = 0;
55 } // namespace ui_controls
57 #endif // UI_TEST_BASE_UI_CONTROLS_AURA_H_