Chromium Code Reviews| Index: ash/shelf/ink_drop_button_listener.h |
| diff --git a/ash/shelf/ink_drop_button_listener.h b/ash/shelf/ink_drop_button_listener.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..554a759b2259b4f4956f22856f4efa0ebd31d87f |
| --- /dev/null |
| +++ b/ash/shelf/ink_drop_button_listener.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_SHELF_INK_DROP_BUTTON_LISTENER_H_ |
| +#define ASH_SHELF_INK_DROP_BUTTON_LISTENER_H_ |
| + |
| +#include "ash/ash_export.h" |
| + |
| +namespace views { |
| +class Button; |
| +class InkDrop; |
| +} |
| + |
| +namespace ash { |
| + |
| +// An interface used by buttons on shelf to notify ShelfView when they are |
| +// pressed. |ink_drop| is used to do appropriate ink drop animation based on the |
| +// action performed. |
| +// TODO(mohsen): A better approach would be to return a value indicating the |
| +// type of action performed such that the button can animate the ink drop. |
| +// Currently, it is not possible because showing menu is synchronous and blocks |
| +// the call. Fix this after menu is converted to synchronous. Long-term, the |
| +// return value can be merged into ButtonListener. |
| +class ASH_EXPORT InkDropButtonListener { |
| + public: |
| + virtual void ButtonPressed(views::Button* sender, |
| + const ui::Event& event, |
| + views::InkDrop* ink_drop) = 0; |
| + |
| + protected: |
| + InkDropButtonListener() {} |
| + virtual ~InkDropButtonListener() {} |
| + |
| + DISALLOW_COPY_AND_ASSIGN(InkDropButtonListener); |
|
James Cook
2016/06/14 16:34:28
nit: You don't need this if you have a pure virtua
mohsen
2016/06/14 20:40:30
Done.
|
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_SHELF_INK_DROP_BUTTON_LISTENER_H_ |