James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_ |
| 6 | #define ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_ |
| 7 | |
| 8 | #include "ash/public/cpp/shelf_item_delegate.h" |
| 9 | #include "base/macros.h" |
| 10 | |
varkha | ae5decc | 2017-05-26 20:05:38 | [diff] [blame^] | 11 | namespace aura { |
| 12 | class Window; |
| 13 | } |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 14 | |
varkha | ae5decc | 2017-05-26 20:05:38 | [diff] [blame^] | 15 | namespace ash { |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 16 | |
| 17 | // ShelfItemDelegate for the items created by ShelfWindowWatcher, for example: |
| 18 | // The Chrome OS settings window, task manager window, and panel windows. |
| 19 | class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate { |
| 20 | public: |
varkha | ae5decc | 2017-05-26 20:05:38 | [diff] [blame^] | 21 | ShelfWindowWatcherItemDelegate(const ShelfID& id, aura::Window* window); |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 22 | ~ShelfWindowWatcherItemDelegate() override; |
| 23 | |
| 24 | private: |
| 25 | // ShelfItemDelegate overrides: |
| 26 | void ItemSelected(std::unique_ptr<ui::Event> event, |
| 27 | int64_t display_id, |
| 28 | ShelfLaunchSource source, |
tzik | 5788c3d | 2017-05-11 10:24:10 | [diff] [blame] | 29 | ItemSelectedCallback callback) override; |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 30 | void ExecuteCommand(uint32_t command_id, int32_t event_flags) override; |
| 31 | void Close() override; |
| 32 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 33 | // The window associated with this item. Not owned. |
varkha | ae5decc | 2017-05-26 20:05:38 | [diff] [blame^] | 34 | aura::Window* window_; |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 35 | |
| 36 | DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherItemDelegate); |
| 37 | }; |
| 38 | |
| 39 | } // namespace ash |
| 40 | |
| 41 | #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_ |