| 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_COMMON_SHELF_INK_DROP_BUTTON_LISTENER_H_ | |
| 6 #define ASH_COMMON_SHELF_INK_DROP_BUTTON_LISTENER_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 | |
| 10 namespace ui { | |
| 11 class Event; | |
| 12 } | |
| 13 | |
| 14 namespace views { | |
| 15 class Button; | |
| 16 class InkDrop; | |
| 17 } | |
| 18 | |
| 19 namespace ash { | |
| 20 | |
| 21 // An interface used by buttons on shelf to notify ShelfView when they are | |
| 22 // pressed. |ink_drop| is used to do appropriate ink drop animation based on the | |
| 23 // action performed. | |
| 24 // TODO(mohsen): A better approach would be to return a value indicating the | |
| 25 // type of action performed such that the button can animate the ink drop. | |
| 26 // Currently, it is not possible because showing menu is synchronous and blocks | |
| 27 // the call. Fix this after menu is converted to synchronous. Long-term, the | |
| 28 // return value can be merged into ButtonListener. | |
| 29 class ASH_EXPORT InkDropButtonListener { | |
| 30 public: | |
| 31 virtual void ButtonPressed(views::Button* sender, | |
| 32 const ui::Event& event, | |
| 33 views::InkDrop* ink_drop) = 0; | |
| 34 | |
| 35 protected: | |
| 36 virtual ~InkDropButtonListener() {} | |
| 37 }; | |
| 38 | |
| 39 } // namespace ash | |
| 40 | |
| 41 #endif // ASH_COMMON_SHELF_INK_DROP_BUTTON_LISTENER_H_ | |
| OLD | NEW |