shelf_window_watcher_item_delegate.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #ifndef ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_
  5. #define ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_
  6. #include "ash/public/cpp/shelf_item_delegate.h"
  7. namespace aura {
  8. class Window;
  9. }
  10. namespace ash {
  11. // ShelfItemDelegate for the items created by ShelfWindowWatcher, for example:
  12. // The Chrome OS settings window, task manager window, and panel windows.
  13. class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate {
  14. public:
  15. ShelfWindowWatcherItemDelegate(const ShelfID& id, aura::Window* window);
  16. ShelfWindowWatcherItemDelegate(const ShelfWindowWatcherItemDelegate&) =
  17. delete;
  18. ShelfWindowWatcherItemDelegate& operator=(
  19. const ShelfWindowWatcherItemDelegate&) = delete;
  20. ~ShelfWindowWatcherItemDelegate() override;
  21. private:
  22. // ShelfItemDelegate overrides:
  23. void ItemSelected(std::unique_ptr<ui::Event> event,
  24. int64_t display_id,
  25. ShelfLaunchSource source,
  26. ItemSelectedCallback callback,
  27. const ItemFilterPredicate& filter_predicate) override;
  28. void GetContextMenu(int64_t display_id,
  29. GetContextMenuCallback callback) override;
  30. void ExecuteCommand(bool from_context_menu,
  31. int64_t command_id,
  32. int32_t event_flags,
  33. int64_t display_id) override;
  34. void Close() override;
  35. // The window associated with this item. Not owned.
  36. aura::Window* window_;
  37. };
  38. } // namespace ash
  39. #endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_