[go: nahoru, domu]

blob: bb225ecbfe23d1b8874dd3c9835d04c94491e5ee [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"
Arthur Sonzogni834e018f2023-04-22 10:20:029#include "base/memory/raw_ptr.h"
James Cookb0bf8e82017-04-09 17:01:4410
varkhaae5decc2017-05-26 20:05:3811namespace aura {
12class Window;
13}
James Cookb0bf8e82017-04-09 17:01:4414
varkhaae5decc2017-05-26 20:05:3815namespace ash {
James Cookb0bf8e82017-04-09 17:01:4416
17// ShelfItemDelegate for the items created by ShelfWindowWatcher, for example:
18// The Chrome OS settings window, task manager window, and panel windows.
19class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate {
20 public:
varkhaae5decc2017-05-26 20:05:3821 ShelfWindowWatcherItemDelegate(const ShelfID& id, aura::Window* window);
Peter Boströmec31a042021-09-16 23:37:3422
23 ShelfWindowWatcherItemDelegate(const ShelfWindowWatcherItemDelegate&) =
24 delete;
25 ShelfWindowWatcherItemDelegate& operator=(
26 const ShelfWindowWatcherItemDelegate&) = delete;
27
James Cookb0bf8e82017-04-09 17:01:4428 ~ShelfWindowWatcherItemDelegate() override;
29
30 private:
31 // ShelfItemDelegate overrides:
32 void ItemSelected(std::unique_ptr<ui::Event> event,
33 int64_t display_id,
34 ShelfLaunchSource source,
Ahmed Fakhry1b6ea0b2020-07-09 01:45:2435 ItemSelectedCallback callback,
36 const ItemFilterPredicate& filter_predicate) override;
Mike Wasserman3bfabb192019-05-17 01:08:3437 void GetContextMenu(int64_t display_id,
38 GetContextMenuCallback callback) override;
Michael Wasserman47bf1782017-08-18 23:17:1039 void ExecuteCommand(bool from_context_menu,
40 int64_t command_id,
41 int32_t event_flags,
42 int64_t display_id) override;
James Cookb0bf8e82017-04-09 17:01:4443 void Close() override;
44
James Cookb0bf8e82017-04-09 17:01:4445 // The window associated with this item. Not owned.
Bartek Nowierskideb75842023-12-27 02:32:4246 raw_ptr<aura::Window> window_;
James Cookb0bf8e82017-04-09 17:01:4447};
48
49} // namespace ash
50
51#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_