| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LAUNCHER_ITEM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/common/shelf/shelf_item_delegate.h" | 10 #include "ash/common/shelf/shelf_item_delegate.h" |
| 11 #include "ash/common/shelf/shelf_item_types.h" | 11 #include "ash/common/shelf/shelf_item_types.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" | 14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" |
| 15 #include "ui/events/event.h" | 15 #include "ui/events/event.h" |
| 16 | 16 |
| 17 class AppWindowLauncherItemController; | 17 class AppWindowLauncherItemController; |
| 18 class ChromeLauncherController; | 18 class ChromeLauncherController; |
| 19 class ChromeLauncherAppMenuItem; | 19 class ChromeLauncherAppMenuItem; |
| 20 | 20 |
| 21 using ChromeLauncherAppMenuItems = | 21 using ChromeLauncherAppMenuItems = |
| 22 std::vector<std::unique_ptr<ChromeLauncherAppMenuItem>>; | 22 std::vector<std::unique_ptr<ChromeLauncherAppMenuItem>>; |
| 23 | 23 |
| 24 // LauncherItemController is used by ChromeLauncherController to track one | 24 // LauncherItemController is used by ChromeLauncherController to track one |
| 25 // or more windows associated with a shelf item. | 25 // or more windows associated with a shelf item. |
| 26 // TODO (khmel): Consider using ash::launcher::AppLauncherId instead of pair |
| 27 // |app_id| and |launch_id|. |
| 26 class LauncherItemController : public ash::ShelfItemDelegate { | 28 class LauncherItemController : public ash::ShelfItemDelegate { |
| 27 public: | 29 public: |
| 28 LauncherItemController(const std::string& app_id, | 30 LauncherItemController(const std::string& app_id, |
| 29 const std::string& launch_id, | 31 const std::string& launch_id, |
| 30 ChromeLauncherController* launcher_controller); | 32 ChromeLauncherController* launcher_controller); |
| 31 ~LauncherItemController() override; | 33 ~LauncherItemController() override; |
| 32 | 34 |
| 33 ash::ShelfID shelf_id() const { return shelf_id_; } | 35 ash::ShelfID shelf_id() const { return shelf_id_; } |
| 34 void set_shelf_id(ash::ShelfID id) { shelf_id_ = id; } | 36 void set_shelf_id(ash::ShelfID id) { shelf_id_ = id; } |
| 35 const std::string& app_id() const { return app_id_; } | 37 const std::string& app_id() const { return app_id_; } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // applications. | 86 // applications. |
| 85 int locked_; | 87 int locked_; |
| 86 | 88 |
| 87 // Set to true if the launcher item image has been set by the controller. | 89 // Set to true if the launcher item image has been set by the controller. |
| 88 bool image_set_by_controller_; | 90 bool image_set_by_controller_; |
| 89 | 91 |
| 90 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); | 92 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ | 95 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ |
| OLD | NEW |