Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ | 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_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ |
| 7 | 7 |
| 8 #include <map> | |
| 9 #include <string> | 8 #include <string> |
| 10 | 9 |
| 11 #include "base/macros.h" | 10 #include "base/macros.h" |
| 12 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" | 11 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" |
| 13 | 12 |
| 14 namespace extensions { | 13 namespace extensions { |
| 15 class AppWindow; | 14 class AppWindow; |
| 16 } | 15 } |
| 17 | 16 |
| 18 class ChromeLauncherController; | 17 class ChromeLauncherController; |
| 19 | 18 |
| 20 class ExtensionAppWindowLauncherItemController | 19 class ExtensionAppWindowLauncherItemController |
|
James Cook
2017/03/01 19:50:48
nit: while you're here, could you add a comment ab
msw
2017/03/02 02:59:20
Done for this and ArcAppWindowLauncherItemControll
| |
| 21 : public AppWindowLauncherItemController { | 20 : public AppWindowLauncherItemController { |
| 22 public: | 21 public: |
| 23 ExtensionAppWindowLauncherItemController( | 22 ExtensionAppWindowLauncherItemController( |
| 24 const std::string& app_id, | 23 const std::string& app_id, |
| 25 const std::string& launch_id, | 24 const std::string& launch_id, |
| 26 ChromeLauncherController* controller); | 25 ChromeLauncherController* controller); |
| 27 | 26 |
| 28 ~ExtensionAppWindowLauncherItemController() override; | 27 ~ExtensionAppWindowLauncherItemController() override; |
| 29 | 28 |
| 30 void AddAppWindow(extensions::AppWindow* app_window); | 29 void AddAppWindow(extensions::AppWindow* app_window); |
| 31 | 30 |
| 32 // LauncherItemController overrides: | 31 // AppWindowLauncherItemController: |
| 33 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; | 32 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; |
| 34 | 33 void ExecuteCommand(uint32_t command_id, int32_t event_flags) override; |
| 35 protected: | |
| 36 // AppWindowLauncherItemController: | |
| 37 void OnWindowRemoved(ui::BaseWindow* window) override; | |
| 38 | 34 |
| 39 private: | 35 private: |
| 40 using WindowToAppWindow = | |
| 41 std::map<const ui::BaseWindow*, extensions::AppWindow*>; | |
| 42 | |
| 43 WindowToAppWindow window_to_app_window_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController); | 36 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController); |
| 46 }; | 37 }; |
| 47 | 38 |
| 48 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CON TROLLER_H_ | 39 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CON TROLLER_H_ |
| OLD | NEW |