[go: nahoru, domu]

blob: 00bbd6a2314162ee0439f328fa8dc2424045f3a2 [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,
tzik5788c3d2017-05-11 10:24:1029 ItemSelectedCallback callback) override;
James Cookb0bf8e82017-04-09 17:01:4430 void ExecuteCommand(uint32_t command_id, int32_t event_flags) override;
31 void Close() override;
32
James Cookb0bf8e82017-04-09 17:01:4433 // The window associated with this item. Not owned.
varkhaae5decc2017-05-26 20:05:3834 aura::Window* window_;
James Cookb0bf8e82017-04-09 17:01:4435
36 DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherItemDelegate);
37};
38
39} // namespace ash
40
41#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_