[go: nahoru, domu]

blob: 61b228f8350a8d9915804d5a54384f0c2f4bc9d1 [file] [log] [blame]
James Cookb0bf8e82017-04-09 17:01:441// 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
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);
James Cookb0bf8e82017-04-09 17:01:4422 ~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,
Ahmed Fakhry1b6ea0b2020-07-09 01:45:2429 ItemSelectedCallback callback,
30 const ItemFilterPredicate& filter_predicate) override;
Mike Wasserman3bfabb192019-05-17 01:08:3431 void GetContextMenu(int64_t display_id,
32 GetContextMenuCallback callback) override;
Michael Wasserman47bf1782017-08-18 23:17:1033 void ExecuteCommand(bool from_context_menu,
34 int64_t command_id,
35 int32_t event_flags,
36 int64_t display_id) override;
James Cookb0bf8e82017-04-09 17:01:4437 void Close() override;
38
James Cookb0bf8e82017-04-09 17:01:4439 // The window associated with this item. Not owned.
varkhaae5decc2017-05-26 20:05:3840 aura::Window* window_;
James Cookb0bf8e82017-04-09 17:01:4441
42 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherItemDelegate);
43};
44
45} // namespace ash
46
47#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_