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