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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.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 one unit test and addressed comments 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_PER_APP_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 17 matching lines...) Expand all
28 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" 28 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
29 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 29 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
30 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h" 30 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h"
31 #include "chrome/browser/ui/browser_list_observer.h" 31 #include "chrome/browser/ui/browser_list_observer.h"
32 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" 32 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
33 #include "content/public/browser/notification_observer.h" 33 #include "content/public/browser/notification_observer.h"
34 #include "content/public/browser/notification_registrar.h" 34 #include "content/public/browser/notification_registrar.h"
35 #include "ui/aura/window_observer.h" 35 #include "ui/aura/window_observer.h"
36 36
37 class AppSyncUIState; 37 class AppSyncUIState;
38 class BaseWindow;
38 class Browser; 39 class Browser;
39 class BrowserLauncherItemControllerTest; 40 class BrowserLauncherItemControllerTest;
40 class ExtensionEnableFlow; 41 class ExtensionEnableFlow;
41 class LauncherItemController; 42 class LauncherItemController;
42 class Profile; 43 class Profile;
43 class TabContents; 44 class TabContents;
44 45
45 namespace ash { 46 namespace ash {
46 class LauncherModel; 47 class LauncherModel;
47 } 48 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 AppState app_state) OVERRIDE; 246 AppState app_state) OVERRIDE;
246 247
247 // Limits application refocusing to urls that match |url| for |id|. 248 // Limits application refocusing to urls that match |url| for |id|.
248 virtual void SetRefocusURLPatternForTest(ash::LauncherID id, 249 virtual void SetRefocusURLPatternForTest(ash::LauncherID id,
249 const GURL& url) OVERRIDE; 250 const GURL& url) OVERRIDE;
250 251
251 // Returns the extension identified by |app_id|. 252 // Returns the extension identified by |app_id|.
252 virtual const extensions::Extension* GetExtensionForAppID( 253 virtual const extensions::Extension* GetExtensionForAppID(
253 const std::string& app_id) const OVERRIDE; 254 const std::string& app_id) const OVERRIDE;
254 255
256 // Activates a |window|. If |allow_minimize| is true and the system allows
257 // it, the the window will get minimized instead.
258 virtual void ActivateWindowOrMinimizeIfActive(BaseWindow* window,
259 bool allow_minimize) OVERRIDE;
260
255 // ash::LauncherDelegate overrides: 261 // ash::LauncherDelegate overrides:
256 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE; 262 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE;
257 virtual void ItemClicked(const ash::LauncherItem& item, 263 virtual void ItemClicked(const ash::LauncherItem& item,
258 const ui::Event& event) OVERRIDE; 264 const ui::Event& event) OVERRIDE;
259 virtual int GetBrowserShortcutResourceId() OVERRIDE; 265 virtual int GetBrowserShortcutResourceId() OVERRIDE;
260 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; 266 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE;
261 virtual ui::MenuModel* CreateContextMenu( 267 virtual ui::MenuModel* CreateContextMenu(
262 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE; 268 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE;
263 virtual ash::LauncherMenuModel* CreateApplicationMenu( 269 virtual ash::LauncherMenuModel* CreateApplicationMenu(
264 const ash::LauncherItem& item, 270 const ash::LauncherItem& item,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 480
475 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; 481 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_;
476 482
477 // Launchers that are currently being observed. 483 // Launchers that are currently being observed.
478 std::set<ash::Launcher*> launchers_; 484 std::set<ash::Launcher*> launchers_;
479 485
480 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp); 486 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp);
481 }; 487 };
482 488
483 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 489 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698