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

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

Issue 2798173002: mash: Remove ChromeLauncherController's |id_to_item_controller_map_|. (Closed)
Patch Set: Address comment; fix browser tests. Created 3 years, 8 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Returns the shelf item with the given id, or null if |id| isn't found. 82 // Returns the shelf item with the given id, or null if |id| isn't found.
83 virtual const ash::ShelfItem* GetItem(ash::ShelfID id) const = 0; 83 virtual const ash::ShelfItem* GetItem(ash::ShelfID id) const = 0;
84 84
85 // Updates the type of an item. 85 // Updates the type of an item.
86 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0; 86 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0;
87 87
88 // Updates the running status of an item. It will also update the status of 88 // Updates the running status of an item. It will also update the status of
89 // browsers shelf item if needed. 89 // browsers shelf item if needed.
90 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; 90 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0;
91 91
92 // Updates the delegate associated with id (which should be a shortcut).
93 virtual void SetShelfItemDelegate(
94 ash::ShelfID id,
95 std::unique_ptr<ash::ShelfItemDelegate> item_delegate) = 0;
96
97 // Closes or unpins the shelf item. 92 // Closes or unpins the shelf item.
98 virtual void CloseLauncherItem(ash::ShelfID id) = 0; 93 virtual void CloseLauncherItem(ash::ShelfID id) = 0;
99 94
100 // Returns true if the item identified by |id| is pinned. 95 // Returns true if the item identified by |id| is pinned.
101 virtual bool IsPinned(ash::ShelfID id) = 0; 96 virtual bool IsPinned(ash::ShelfID id) = 0;
102 97
103 // Set the shelf item status for the V1 application with the given |app_id|. 98 // Set the shelf item status for the V1 application with the given |app_id|.
104 // Adds or removes an item as needed to respect the running and pinned state. 99 // Adds or removes an item as needed to respect the running and pinned state.
105 virtual void SetV1AppStatus(const std::string& app_id, 100 virtual void SetV1AppStatus(const std::string& app_id,
106 ash::ShelfItemStatus status) = 0; 101 ash::ShelfItemStatus status) = 0;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 190
196 // Get the title for the applicatoin list entry for |web_contents|. 191 // Get the title for the applicatoin list entry for |web_contents|.
197 // If |web_contents| has not loaded, returns "Net Tab". 192 // If |web_contents| has not loaded, returns "Net Tab".
198 virtual base::string16 GetAppListTitle( 193 virtual base::string16 GetAppListTitle(
199 content::WebContents* web_contents) const = 0; 194 content::WebContents* web_contents) const = 0;
200 195
201 // Returns the ash::ShelfItemDelegate of BrowserShortcut. 196 // Returns the ash::ShelfItemDelegate of BrowserShortcut.
202 virtual BrowserShortcutLauncherItemController* 197 virtual BrowserShortcutLauncherItemController*
203 GetBrowserShortcutLauncherItemController() = 0; 198 GetBrowserShortcutLauncherItemController() = 0;
204 199
205 virtual ash::ShelfItemDelegate* GetShelfItemDelegate(
206 const ash::ShelfID id) = 0;
207
208 // Check if the shelf visibility (location, visibility) will change with a new 200 // Check if the shelf visibility (location, visibility) will change with a new
209 // user profile or not. However, since the full visibility calculation of the 201 // user profile or not. However, since the full visibility calculation of the
210 // shelf cannot be performed here, this is only a probability used for 202 // shelf cannot be performed here, this is only a probability used for
211 // animation predictions. 203 // animation predictions.
212 virtual bool ShelfBoundsChangesProbablyWithUser( 204 virtual bool ShelfBoundsChangesProbablyWithUser(
213 ash::WmShelf* shelf, 205 ash::WmShelf* shelf,
214 const AccountId& account_id) const = 0; 206 const AccountId& account_id) const = 0;
215 207
216 // Called when the user profile is fully loaded and ready to switch to. 208 // Called when the user profile is fully loaded and ready to switch to.
217 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0; 209 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // An observer that manages the shelf title and icon for settings windows. 292 // An observer that manages the shelf title and icon for settings windows.
301 SettingsWindowObserver settings_window_observer_; 293 SettingsWindowObserver settings_window_observer_;
302 294
303 // Used to load the images for app items. 295 // Used to load the images for app items.
304 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; 296 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_;
305 297
306 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 298 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
307 }; 299 };
308 300
309 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 301 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698