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

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

Issue 2039543002: Getting rid of ChromeLauncherController::model(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROME_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 class ChromeLauncherControllerUserSwitchObserver; 70 class ChromeLauncherControllerUserSwitchObserver;
71 71
72 // A list of the elements which makes up a simple menu description. 72 // A list of the elements which makes up a simple menu description.
73 typedef ScopedVector<ChromeLauncherAppMenuItem> ChromeLauncherAppMenuItems; 73 typedef ScopedVector<ChromeLauncherAppMenuItem> ChromeLauncherAppMenuItems;
74 74
75 // ChromeLauncherController manages the launcher items needed for content 75 // ChromeLauncherController manages the launcher items needed for content
76 // windows. Launcher items have a type, an optional app id, and a controller. 76 // windows. Launcher items have a type, an optional app id, and a controller.
77 // This incarnation groups running tabs/windows in application specific lists. 77 // This incarnation groups running tabs/windows in application specific lists.
78 // * Browser app windows have BrowserLauncherItemController, owned by the 78 // * Browser app windows have BrowserShortcutLauncherItemController, owned by
79 // BrowserView instance. 79 // the BrowserView instance.
80 // * App windows have AppWindowLauncherItemController, owned by 80 // * App windows have AppWindowLauncherItemController, owned by
81 // AppWindowLauncherController. 81 // AppWindowLauncherController.
82 // * Shortcuts have no LauncherItemController. 82 // * Shortcuts have no LauncherItemController.
83 class ChromeLauncherController 83 class ChromeLauncherController
84 : public ash::ShelfDelegate, 84 : public ash::ShelfDelegate,
85 public ash::ShelfModelObserver, 85 public ash::ShelfModelObserver,
86 public ash::WindowTreeHostManager::Observer, 86 public ash::WindowTreeHostManager::Observer,
87 public AppIconLoaderDelegate, 87 public AppIconLoaderDelegate,
88 public syncable_prefs::PrefServiceSyncableObserver, 88 public syncable_prefs::PrefServiceSyncableObserver,
89 public AppSyncUIStateObserver, 89 public AppSyncUIStateObserver,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 // Invoked when the user clicks on button in the shelf to create a new 211 // Invoked when the user clicks on button in the shelf to create a new
212 // incognito window. 212 // incognito window.
213 void CreateNewIncognitoWindow(); 213 void CreateNewIncognitoWindow();
214 214
215 // Updates the pinned pref state. The pinned state consists of a list pref. 215 // Updates the pinned pref state. The pinned state consists of a list pref.
216 // Each item of the list is a dictionary. The key |kAppIDPath| gives the 216 // Each item of the list is a dictionary. The key |kAppIDPath| gives the
217 // id of the app. 217 // id of the app.
218 void PersistPinnedState(); 218 void PersistPinnedState();
219 219
220 ash::ShelfModel* model();
221
222 // Accessor to the currently loaded profile. Note that in multi profile use 220 // Accessor to the currently loaded profile. Note that in multi profile use
223 // cases this might change over time. 221 // cases this might change over time.
224 Profile* profile(); 222 Profile* profile();
225 223
226 // Notify the controller that the state of an non platform app's tabs 224 // Notify the controller that the state of an non platform app's tabs
227 // have changed, 225 // have changed,
228 void UpdateAppState(content::WebContents* contents, AppState app_state); 226 void UpdateAppState(content::WebContents* contents, AppState app_state);
229 227
230 // Returns ShelfID for |contents|. If |contents| is not an app or is not 228 // Returns ShelfID for |contents|. If |contents| is not an app or is not
231 // pinned, returns the id of browser shrotcut. 229 // pinned, returns the id of browser shrotcut.
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // The list of running & un-pinned applications for different users on hidden 546 // The list of running & un-pinned applications for different users on hidden
549 // desktops. 547 // desktops.
550 typedef std::vector<std::string> RunningAppListIds; 548 typedef std::vector<std::string> RunningAppListIds;
551 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; 549 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap;
552 RunningAppListIdMap last_used_running_application_order_; 550 RunningAppListIdMap last_used_running_application_order_;
553 551
554 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 552 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
555 }; 553 };
556 554
557 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 555 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698