Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h

Issue 2171813004: mash: Fold ShelfItemDelegateManager into ShelfModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicitly destroy ShelfItemDelegates Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/scoped_observer.h" 12 #include "base/scoped_observer.h"
13 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" 13 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
14 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
15 15
16 namespace aura { 16 namespace aura {
17 class Window; 17 class Window;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class BaseWindow; 21 class BaseWindow;
22 } 22 }
23 23
24 class ChromeLauncherController; 24 class ChromeLauncherController;
25 25
26 // This is a LauncherItemController for abstract app windows. There is one 26 // This is a LauncherItemController for abstract app windows. There is one
27 // instance per app, per launcher id. For apps with multiple windows, each item 27 // instance per app, per launcher id. For apps with multiple windows, each item
28 // controller keeps track of all windows associated with the app and their 28 // controller keeps track of all windows associated with the app and their
29 // activation order. Instances are owned by ash::ShelfItemDelegateManager. 29 // activation order. Instances are owned by ash::ShelfModel.
30 // 30 //
31 // Tests are in chrome_launcher_controller_impl_browsertest.cc 31 // Tests are in chrome_launcher_controller_impl_browsertest.cc
32 class AppWindowLauncherItemController : public LauncherItemController, 32 class AppWindowLauncherItemController : public LauncherItemController,
33 public aura::WindowObserver { 33 public aura::WindowObserver {
34 public: 34 public:
35 using WindowList = std::list<ui::BaseWindow*>; 35 using WindowList = std::list<ui::BaseWindow*>;
36 36
37 ~AppWindowLauncherItemController() override; 37 ~AppWindowLauncherItemController() override;
38 38
39 void AddWindow(ui::BaseWindow* window); 39 void AddWindow(ui::BaseWindow* window);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // AppLauncherItemController for each |app_shelf_id_|. 106 // AppLauncherItemController for each |app_shelf_id_|.
107 const std::string app_shelf_id_; 107 const std::string app_shelf_id_;
108 108
109 // Scoped list of observed windows (for removal on destruction) 109 // Scoped list of observed windows (for removal on destruction)
110 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; 110 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;
111 111
112 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController); 112 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController);
113 }; 113 };
114 114
115 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ 115 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/test/test_shelf_delegate.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698