Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h |
| diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h |
| index e1fd8767a114e4be4af3debd6ca8c8b24f7e9e4c..d8de87ebcea44fb554399789047b5399a3c76107 100644 |
| --- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h |
| +++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h |
| @@ -13,6 +13,8 @@ |
| #include "base/scoped_observer.h" |
| #include "ui/aura/window_observer.h" |
| +class ChromeLauncherController; |
| + |
| namespace aura { |
| class Window; |
| } |
| @@ -60,15 +62,11 @@ class AppWindowLauncherItemController : public ash::ShelfItemDelegate, |
| // Activates the window at position |index|. |
| void ActivateIndexedApp(size_t index); |
| - // Called when launcher item may need to be updated, eg. label or icon. |
| - // TODO(khmel): Use aura::Window property and observe property change |
| - // http://crbug.com/724292 |
| - virtual void UpdateLauncherItem() {} |
| - |
| const WindowList& windows() const { return windows_; } |
| protected: |
| - explicit AppWindowLauncherItemController(const ash::ShelfID& shelf_id); |
| + AppWindowLauncherItemController(const ash::ShelfID& shelf_id, |
| + ChromeLauncherController* owner); |
| // Returns the action performed. Should be one of SHELF_ACTION_NONE, |
| // SHELF_ACTION_WINDOW_ACTIVATED, or SHELF_ACTION_WINDOW_MINIMIZED. |
| @@ -84,9 +82,16 @@ class AppWindowLauncherItemController : public ash::ShelfItemDelegate, |
| // Returns last active window in the controller or first window. |
| ui::BaseWindow* GetLastActiveWindow(); |
| + ChromeLauncherController* owner() { return owner_; } |
| + |
| private: |
| WindowList::iterator GetFromNativeWindow(aura::Window* window); |
| + void UpdateLauncherItem(); |
|
msw
2017/05/23 00:02:29
nit: comment (or inline in OnWindowPropertyChanged
khmel
2017/05/23 16:11:43
Done. Inlining is not very possible because it is
|
| + |
| + // Unowned pointer. |
| + ChromeLauncherController* const owner_; |
| + |
| // List of associated app windows |
| WindowList windows_; |