OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ | |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ | |
7 | |
8 #include <map> | |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" | |
13 | |
14 namespace extensions { | |
15 class AppWindow; | |
16 } | |
17 | |
18 class ChromeLauncherController; | |
19 | |
20 class ExtensionAppWindowLauncherItemController | |
21 : public AppWindowLauncherItemController { | |
22 public: | |
23 ExtensionAppWindowLauncherItemController( | |
24 Type type, | |
25 const std::string& app_shelf_id, | |
26 const std::string& app_id, | |
27 ChromeLauncherController* controller); | |
28 | |
29 ~ExtensionAppWindowLauncherItemController() override; | |
30 | |
31 void AddAppWindow(extensions::AppWindow* app_window); | |
32 | |
33 // LauncherItemController overrides: | |
34 ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override; | |
35 ash::ShelfItemDelegate::PerformedAction ItemSelected( | |
36 const ui::Event& eent) override; | |
dcheng
2016/03/26 09:02:31
Nit: event
khmel
2016/03/28 17:17:31
Done.
| |
37 base::string16 GetTitle() override; | |
38 ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override; | |
39 bool IsDraggable() override; | |
40 bool ShouldShowTooltip() override; | |
41 | |
42 protected: | |
43 // AppWindowLauncherItemController: | |
44 void OnWindowRemoved(ui::BaseWindow* window) override; | |
45 | |
46 private: | |
47 using WindowToAppWindow = std::map<ui::BaseWindow*, extensions::AppWindow*>; | |
48 | |
49 WindowToAppWindow window_to_app_window_; | |
50 | |
51 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController); | |
52 }; | |
53 | |
54 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CON TROLLER_H_ | |
OLD | NEW |