OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ |
6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace views { | 9 namespace views { |
10 class MouseEvent; | 10 class MouseEvent; |
11 class View; | 11 class View; |
12 } | 12 } |
13 | 13 |
14 namespace aura_shell { | 14 namespace ash { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 // The launcher buttons communicate back to the host by way of this interface. | 17 // The launcher buttons communicate back to the host by way of this interface. |
18 // This interface is used to enable reordering the items on the launcher. | 18 // This interface is used to enable reordering the items on the launcher. |
19 class LauncherButtonHost { | 19 class LauncherButtonHost { |
20 public: | 20 public: |
21 // Invoked when the mose is pressed on a view. | 21 // Invoked when the mose is pressed on a view. |
22 virtual void MousePressedOnButton(views::View* view, | 22 virtual void MousePressedOnButton(views::View* view, |
23 const views::MouseEvent& event) = 0; | 23 const views::MouseEvent& event) = 0; |
24 | 24 |
25 // Invoked when the mouse is dragged over a view. | 25 // Invoked when the mouse is dragged over a view. |
26 virtual void MouseDraggedOnButton(views::View* view, | 26 virtual void MouseDraggedOnButton(views::View* view, |
27 const views::MouseEvent& event) = 0; | 27 const views::MouseEvent& event) = 0; |
28 | 28 |
29 // Invoked either if the mouse is released or mouse capture canceled. | 29 // Invoked either if the mouse is released or mouse capture canceled. |
30 virtual void MouseReleasedOnButton(views::View* view, | 30 virtual void MouseReleasedOnButton(views::View* view, |
31 bool canceled) = 0; | 31 bool canceled) = 0; |
32 | 32 |
33 protected: | 33 protected: |
34 virtual ~LauncherButtonHost() {} | 34 virtual ~LauncherButtonHost() {} |
35 }; | 35 }; |
36 | 36 |
37 } // namespace internal | 37 } // namespace internal |
38 } // namespace aura_shell | 38 } // namespace ash |
39 | 39 |
40 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ | 40 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ |
OLD | NEW |