OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
| 6 #define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 namespace views { |
| 11 class Widget; |
| 12 } |
| 13 |
| 14 namespace gfx { |
| 15 class Point; |
| 16 } |
| 17 |
| 18 namespace ash { |
| 19 |
| 20 class AutoclickControllerCommonDelegate { |
| 21 public: |
| 22 AutoclickControllerCommonDelegate() {} |
| 23 virtual ~AutoclickControllerCommonDelegate() {} |
| 24 |
| 25 // Creates a ring widget at |event_location|. AutoclickControllerCommon |
| 26 // takes ownership of the created widget. |
| 27 virtual std::unique_ptr<views::Widget> CreateAutoclickRingWidget( |
| 28 const gfx::Point& event_location) = 0; |
| 29 |
| 30 // Moves |widget| to |event_location|. |
| 31 virtual void UpdateAutoclickRingWidget(views::Widget* widget, |
| 32 const gfx::Point& event_location) = 0; |
| 33 |
| 34 // Generates a click with |mouse_event_flags| at |event_location|. |
| 35 virtual void DoAutoclick(const gfx::Point& event_location, |
| 36 const int mouse_event_flags) = 0; |
| 37 |
| 38 virtual void OnAutoclickCanceled() = 0; |
| 39 |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(AutoclickControllerCommonDelegate); |
| 42 }; |
| 43 |
| 44 } // namespace ash |
| 45 |
| 46 #endif // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
OLD | NEW |