OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // A delegate that | 4 // A delegate that |
5 | 5 |
6 #ifndef ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ | 6 #ifndef ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ |
7 #define ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ | 7 #define ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 | 12 |
13 // A pure-virtual delegate that is used by the TransparentActivateWindowButton | 13 // A pure-virtual delegate that is used by the TransparentActivateWindowButton |
14 // to manipulate windows while in overview mode. | 14 // to manipulate windows while in overview mode. |
15 class ASH_EXPORT TransparentActivateWindowButtonDelegate { | 15 class ASH_EXPORT TransparentActivateWindowButtonDelegate { |
16 public: | 16 public: |
| 17 // Called when a touch scroll event occurs. |drag_x| is an absolute pixel |
| 18 // distance in the TransparentActivateWindowButton's local cooridnates. |
| 19 virtual void Scroll(int delta_x) = 0; |
| 20 |
| 21 // Called when a touch scroll event ends and the distance scrolled is less |
| 22 // than the minimum close distance. |
| 23 virtual void CancelScroll() = 0; |
| 24 |
17 // Called when the TransparentActivateWindowButton was selected. | 25 // Called when the TransparentActivateWindowButton was selected. |
18 virtual void Select() = 0; | 26 virtual void Select() = 0; |
19 | 27 |
| 28 // Called when a TransparentActivateWindowButton close event occurs. |
| 29 virtual void Close() = 0; |
| 30 |
20 protected: | 31 protected: |
21 TransparentActivateWindowButtonDelegate() {} | 32 TransparentActivateWindowButtonDelegate() {} |
22 virtual ~TransparentActivateWindowButtonDelegate() {} | 33 virtual ~TransparentActivateWindowButtonDelegate() {} |
23 | 34 |
24 private: | 35 private: |
25 DISALLOW_COPY_AND_ASSIGN(TransparentActivateWindowButtonDelegate); | 36 DISALLOW_COPY_AND_ASSIGN(TransparentActivateWindowButtonDelegate); |
26 }; | 37 }; |
27 | 38 |
28 } // namespace ash | 39 } // namespace ash |
29 | 40 |
30 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ | 41 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_DELEGATE_H_ |
OLD | NEW |