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

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

Issue 14328031: Adding a minimize function for clicks on launcher items if only a single item (already active) is a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added bounce animation in case of no minimize Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 9
10 #include "ash/launcher/launcher_delegate.h" 10 #include "ash/launcher/launcher_delegate.h"
11 #include "ash/launcher/launcher_types.h" 11 #include "ash/launcher/launcher_types.h"
12 #include "ash/shelf/shelf_types.h" 12 #include "ash/shelf/shelf_types.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "chrome/browser/extensions/app_icon_loader.h" 14 #include "chrome/browser/extensions/app_icon_loader.h"
15 #include "chrome/browser/extensions/extension_prefs.h" 15 #include "chrome/browser/extensions/extension_prefs.h"
16 16
17 class BaseWindow;
17 class BrowserLauncherItemControllerTest; 18 class BrowserLauncherItemControllerTest;
18 class LauncherItemController; 19 class LauncherItemController;
19 class Profile; 20 class Profile;
20 class ChromeLauncherAppMenuItem; 21 class ChromeLauncherAppMenuItem;
21 class ChromeLauncherControllerPerApp; 22 class ChromeLauncherControllerPerApp;
22 23
23 namespace ash { 24 namespace ash {
24 class LauncherModel; 25 class LauncherModel;
25 } 26 }
26 27
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 AppState app_state) = 0; 250 AppState app_state) = 0;
250 251
251 // Limits application refocusing to urls that match |url| for |id|. 252 // Limits application refocusing to urls that match |url| for |id|.
252 virtual void SetRefocusURLPatternForTest(ash::LauncherID id, 253 virtual void SetRefocusURLPatternForTest(ash::LauncherID id,
253 const GURL& url) = 0; 254 const GURL& url) = 0;
254 255
255 // Returns the extension identified by |app_id|. 256 // Returns the extension identified by |app_id|.
256 virtual const extensions::Extension* GetExtensionForAppID( 257 virtual const extensions::Extension* GetExtensionForAppID(
257 const std::string& app_id) const = 0; 258 const std::string& app_id) const = 0;
258 259
260 // Activates a |window|. If |allow_minimize| is true and the system allows
261 // it, the the window will get minimized instead.
262 virtual void ActivateWindowOrMinimizeIfActive(BaseWindow* window,
263 bool allow_minimize) = 0;
259 // ash::LauncherDelegate overrides: 264 // ash::LauncherDelegate overrides:
260 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE = 0; 265 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE = 0;
261 virtual void ItemClicked(const ash::LauncherItem& item, 266 virtual void ItemClicked(const ash::LauncherItem& item,
262 const ui::Event& event) OVERRIDE = 0; 267 const ui::Event& event) OVERRIDE = 0;
263 virtual int GetBrowserShortcutResourceId() OVERRIDE = 0; 268 virtual int GetBrowserShortcutResourceId() OVERRIDE = 0;
264 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE = 0; 269 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE = 0;
265 virtual ui::MenuModel* CreateContextMenu( 270 virtual ui::MenuModel* CreateContextMenu(
266 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE = 0; 271 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE = 0;
267 virtual ash::LauncherMenuModel* CreateApplicationMenu( 272 virtual ash::LauncherMenuModel* CreateApplicationMenu(
268 const ash::LauncherItem& item, 273 const ash::LauncherItem& item,
(...skipping 25 matching lines...) Expand all
294 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0; 299 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0;
295 virtual void SetAppIconLoaderForTest(extensions::AppIconLoader* loader) = 0; 300 virtual void SetAppIconLoaderForTest(extensions::AppIconLoader* loader) = 0;
296 virtual const std::string& GetAppIdFromLauncherIdForTest( 301 virtual const std::string& GetAppIdFromLauncherIdForTest(
297 ash::LauncherID id) = 0; 302 ash::LauncherID id) = 0;
298 303
299 private: 304 private:
300 static ChromeLauncherController* instance_; 305 static ChromeLauncherController* instance_;
301 }; 306 };
302 307
303 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 308 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698