Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H | 5 #ifndef ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
| 6 #define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H | 6 #define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 class Widget; | 11 class Widget; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Point; | 15 class Point; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace ash { | 18 namespace ash { |
| 19 | 19 |
| 20 class AutoclickControllerCommonDelegate { | 20 class AutoclickControllerCommonDelegate { |
| 21 public: | 21 public: |
| 22 AutoclickControllerCommonDelegate() {} | 22 AutoclickControllerCommonDelegate() {} |
| 23 virtual ~AutoclickControllerCommonDelegate() {} | 23 virtual ~AutoclickControllerCommonDelegate() {} |
| 24 | 24 |
| 25 // Creates a ring widget at |event_location|. AutoclickControllerCommon | 25 // Creates a ring widget at |event_location|. AutoclickControllerCommon |
|
sky
2016/09/09 21:42:29
Update comment? Also, it's not clear why you want
riajiang
2016/09/12 16:15:46
Done. I think it makes more sense since the app (t
| |
| 26 // takes ownership of the created widget. | 26 // takes ownership of the created widget. |
| 27 virtual std::unique_ptr<views::Widget> CreateAutoclickRingWidget( | 27 virtual views::Widget* CreateAutoclickRingWidget( |
| 28 const gfx::Point& event_location) = 0; | 28 const gfx::Point& event_location) = 0; |
| 29 | 29 |
| 30 // Moves |widget| to |event_location|. | 30 // Moves |widget| to |event_location|. |
| 31 virtual void UpdateAutoclickRingWidget(views::Widget* widget, | 31 virtual void UpdateAutoclickRingWidget(views::Widget* widget, |
| 32 const gfx::Point& event_location) = 0; | 32 const gfx::Point& event_location) = 0; |
| 33 | 33 |
| 34 // Generates a click with |mouse_event_flags| at |event_location|. | 34 // Generates a click with |mouse_event_flags| at |event_location|. |
| 35 virtual void DoAutoclick(const gfx::Point& event_location, | 35 virtual void DoAutoclick(const gfx::Point& event_location, |
| 36 const int mouse_event_flags) = 0; | 36 const int mouse_event_flags) = 0; |
| 37 | 37 |
| 38 virtual void OnAutoclickCanceled() = 0; | 38 virtual void OnAutoclickCanceled() = 0; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(AutoclickControllerCommonDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(AutoclickControllerCommonDelegate); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace ash | 44 } // namespace ash |
| 45 | 45 |
| 46 #endif // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H | 46 #endif // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H |
| OLD | NEW |