[go: nahoru, domu]

blob: 7ede9f4f508649fec11d5ef8c157c52777776f97 [file] [log] [blame]
Avi Drissman3a215d1e2022-09-07 19:43:091// Copyright 2013 The Chromium Authors
James Cookb0bf8e82017-04-09 17:01:442// 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"
James Cookb0bf8e82017-04-09 17:01:449
varkhaae5decc2017-05-26 20:05:3810namespace aura {
11class Window;
12}
James Cookb0bf8e82017-04-09 17:01:4413
varkhaae5decc2017-05-26 20:05:3814namespace ash {
James Cookb0bf8e82017-04-09 17:01:4415
16// ShelfItemDelegate for the items created by ShelfWindowWatcher, for example:
17// The Chrome OS settings window, task manager window, and panel windows.
18class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate {
19 public:
varkhaae5decc2017-05-26 20:05:3820 ShelfWindowWatcherItemDelegate(const ShelfID& id, aura::Window* window);
Peter Boströmec31a042021-09-16 23:37:3421
22 ShelfWindowWatcherItemDelegate(const ShelfWindowWatcherItemDelegate&) =
23 delete;
24 ShelfWindowWatcherItemDelegate& operator=(
25 const ShelfWindowWatcherItemDelegate&) = delete;
26
James Cookb0bf8e82017-04-09 17:01:4427 ~ShelfWindowWatcherItemDelegate() override;
28
29 private:
30 // ShelfItemDelegate overrides:
31 void ItemSelected(std::unique_ptr<ui::Event> event,
32 int64_t display_id,
33 ShelfLaunchSource source,
Ahmed Fakhry1b6ea0b2020-07-09 01:45:2434 ItemSelectedCallback callback,
35 const ItemFilterPredicate& filter_predicate) override;
Mike Wasserman3bfabb192019-05-17 01:08:3436 void GetContextMenu(int64_t display_id,
37 GetContextMenuCallback callback) override;
Michael Wasserman47bf1782017-08-18 23:17:1038 void ExecuteCommand(bool from_context_menu,
39 int64_t command_id,
40 int32_t event_flags,
41 int64_t display_id) override;
James Cookb0bf8e82017-04-09 17:01:4442 void Close() override;
43
James Cookb0bf8e82017-04-09 17:01:4444 // The window associated with this item. Not owned.
varkhaae5decc2017-05-26 20:05:3845 aura::Window* window_;
James Cookb0bf8e82017-04-09 17:01:4446};
47
48} // namespace ash
49
50#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_