| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELF_SHELF_ITEM_DELEGATE_H_ | 5 #ifndef ASH_SHELF_SHELF_ITEM_DELEGATE_H_ |
| 6 #define ASH_SHELF_SHELF_ITEM_DELEGATE_H_ | 6 #define ASH_SHELF_SHELF_ITEM_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class Window; | 12 class Window; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class Event; | 16 class Event; |
| 17 class MenuModel; | 17 class MenuModel; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 | 21 |
| 22 class ShelfMenuModel; | 22 class ShelfMenuModel; |
| 23 | 23 |
| 24 // Delegate for the LauncherItem. | 24 // Delegate for the ShelfItem. |
| 25 class ASH_EXPORT ShelfItemDelegate { | 25 class ASH_EXPORT ShelfItemDelegate { |
| 26 public: | 26 public: |
| 27 virtual ~ShelfItemDelegate() {} | 27 virtual ~ShelfItemDelegate() {} |
| 28 | 28 |
| 29 // Invoked when the user clicks on a window entry in the launcher. | 29 // Invoked when the user clicks on a window entry in the launcher. |
| 30 // |event| is the click event. The |event| is dispatched by a view | 30 // |event| is the click event. The |event| is dispatched by a view |
| 31 // and has an instance of |views::View| as the event target | 31 // and has an instance of |views::View| as the event target |
| 32 // but not |aura::Window|. If the |event| is of type KeyEvent, it is assumed | 32 // but not |aura::Window|. If the |event| is of type KeyEvent, it is assumed |
| 33 // that this was triggered by keyboard action (Alt+<number>) and special | 33 // that this was triggered by keyboard action (Alt+<number>) and special |
| 34 // handling might happen. | 34 // handling might happen. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 61 virtual bool ShouldShowTooltip() = 0; | 61 virtual bool ShouldShowTooltip() = 0; |
| 62 | 62 |
| 63 // Closes all windows associated with this item. | 63 // Closes all windows associated with this item. |
| 64 virtual void Close() = 0; | 64 virtual void Close() = 0; |
| 65 | 65 |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace ash | 68 } // namespace ash |
| 69 | 69 |
| 70 #endif // ASH_SHELF_SHELF_ITEM_DELEGATE_H_ | 70 #endif // ASH_SHELF_SHELF_ITEM_DELEGATE_H_ |
| OLD | NEW |