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

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

Issue 2090133003: Moved methods that don't rely on internal state out of ChromeLauncherController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit changes 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 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Returns ShelfID for |contents|. If |contents| is not an app or is not 166 // Returns ShelfID for |contents|. If |contents| is not an app or is not
167 // pinned, returns the id of browser shrotcut. 167 // pinned, returns the id of browser shrotcut.
168 virtual ash::ShelfID GetShelfIDForWebContents( 168 virtual ash::ShelfID GetShelfIDForWebContents(
169 content::WebContents* contents) = 0; 169 content::WebContents* contents) = 0;
170 170
171 // Limits application refocusing to urls that match |url| for |id|. 171 // Limits application refocusing to urls that match |url| for |id|.
172 virtual void SetRefocusURLPatternForTest(ash::ShelfID id, 172 virtual void SetRefocusURLPatternForTest(ash::ShelfID id,
173 const GURL& url) = 0; 173 const GURL& url) = 0;
174 174
175 // Returns the extension identified by |app_id|.
176 virtual const extensions::Extension* GetExtensionForAppID(
177 const std::string& app_id) const = 0;
178
179 // Activates a |window|. If |allow_minimize| is true and the system allows 175 // Activates a |window|. If |allow_minimize| is true and the system allows
180 // it, the the window will get minimized instead. 176 // it, the the window will get minimized instead.
181 // Returns the action performed. Should be one of kNoAction, 177 // Returns the action performed. Should be one of kNoAction,
182 // kExistingWindowActivated, or kExistingWindowMinimized. 178 // kExistingWindowActivated, or kExistingWindowMinimized.
183 virtual ash::ShelfItemDelegate::PerformedAction 179 virtual ash::ShelfItemDelegate::PerformedAction
184 ActivateWindowOrMinimizeIfActive(ui::BaseWindow* window, 180 ActivateWindowOrMinimizeIfActive(ui::BaseWindow* window,
185 bool allow_minimize) = 0; 181 bool allow_minimize) = 0;
186 182
187 // Called when the active user has changed. 183 // Called when the active user has changed.
188 virtual void ActiveUserChanged(const std::string& user_email) = 0; 184 virtual void ActiveUserChanged(const std::string& user_email) = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // Returns the LauncherItemController of BrowserShortcut. 225 // Returns the LauncherItemController of BrowserShortcut.
230 virtual BrowserShortcutLauncherItemController* 226 virtual BrowserShortcutLauncherItemController*
231 GetBrowserShortcutLauncherItemController() = 0; 227 GetBrowserShortcutLauncherItemController() = 0;
232 228
233 // Apply the Chrome badge to the browser short cut icon if applicable. 229 // Apply the Chrome badge to the browser short cut icon if applicable.
234 virtual void MayUpdateBrowserShortcutItem() = 0; 230 virtual void MayUpdateBrowserShortcutItem() = 0;
235 231
236 virtual LauncherItemController* GetLauncherItemController( 232 virtual LauncherItemController* GetLauncherItemController(
237 const ash::ShelfID id) = 0; 233 const ash::ShelfID id) = 0;
238 234
239 // Returns true if |browser| is owned by the active user.
240 virtual bool IsBrowserFromActiveUser(Browser* browser) = 0;
241
242 // Check if the shelf visibility (location, visibility) will change with a new 235 // Check if the shelf visibility (location, visibility) will change with a new
243 // user profile or not. However, since the full visibility calculation of the 236 // user profile or not. However, since the full visibility calculation of the
244 // shelf cannot be performed here, this is only a probability used for 237 // shelf cannot be performed here, this is only a probability used for
245 // animation predictions. 238 // animation predictions.
246 virtual bool ShelfBoundsChangesProbablyWithUser( 239 virtual bool ShelfBoundsChangesProbablyWithUser(
247 ash::Shelf* shelf, 240 ash::Shelf* shelf,
248 const std::string& user_id) const = 0; 241 const std::string& user_id) const = 0;
249 242
250 // Called when the user profile is fully loaded and ready to switch to. 243 // Called when the user profile is fully loaded and ready to switch to.
251 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0; 244 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0;
252 245
253 // TODO(khmel): Find better home for Pinnable enum.
254 virtual AppListControllerDelegate::Pinnable GetPinnable(
255 const std::string& app_id) = 0;
256
257 // Controller to launch Arc apps in deferred mode. 246 // Controller to launch Arc apps in deferred mode.
258 virtual ArcAppDeferredLauncherController* GetArcDeferredLauncher() = 0; 247 virtual ArcAppDeferredLauncherController* GetArcDeferredLauncher() = 0;
259 248
260 protected: 249 protected:
261 ChromeLauncherController(); 250 ChromeLauncherController();
262 251
263 private: 252 private:
264 static ChromeLauncherController* instance_; 253 static ChromeLauncherController* instance_;
265 254
266 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 255 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
267 }; 256 };
268 257
269 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 258 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698