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