| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER
_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER
_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER
_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER
_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" | 8 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 class WebContents; | 11 class WebContents; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Image; | 15 class Image; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class Browser; | 18 class Browser; |
| 19 class ChromeLauncherController; | 19 class ChromeLauncherController; |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 // Item controller for an browser shortcut. | 22 // Item controller for an browser shortcut. |
| 23 class BrowserShortcutLauncherItemController : public LauncherItemController { | 23 class BrowserShortcutLauncherItemController : public LauncherItemController { |
| 24 public: | 24 public: |
| 25 BrowserShortcutLauncherItemController(ChromeLauncherController* controller, | 25 BrowserShortcutLauncherItemController(ChromeLauncherController* controller, |
| 26 Profile* profile); | 26 Profile* profile); |
| 27 | 27 |
| 28 virtual ~BrowserShortcutLauncherItemController(); | 28 virtual ~BrowserShortcutLauncherItemController(); |
| 29 | 29 |
| 30 // Updates the activation state of the Broswer item. |
| 31 void UpdateBrowserItemStatus(); |
| 32 |
| 30 // LauncherItemController overrides: | 33 // LauncherItemController overrides: |
| 31 virtual string16 GetTitle() OVERRIDE; | 34 virtual string16 GetTitle() OVERRIDE; |
| 32 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE; | 35 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE; |
| 33 virtual bool IsOpen() const OVERRIDE; | 36 virtual bool IsOpen() const OVERRIDE; |
| 34 virtual bool IsVisible() const OVERRIDE; | 37 virtual bool IsVisible() const OVERRIDE; |
| 35 virtual void Launch(int event_flags) OVERRIDE; | 38 virtual void Launch(int event_flags) OVERRIDE; |
| 36 virtual void Activate() OVERRIDE; | 39 virtual void Activate() OVERRIDE; |
| 37 virtual void Close() OVERRIDE; | 40 virtual void Close() OVERRIDE; |
| 38 virtual void LauncherItemChanged( | 41 virtual void LauncherItemChanged( |
| 39 int model_index, | 42 int model_index, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 // Get the title for the browser list entry for |web_contents|. | 54 // Get the title for the browser list entry for |web_contents|. |
| 52 // If |web_contents| has not loaded, returns "Net Tab". | 55 // If |web_contents| has not loaded, returns "Net Tab". |
| 53 string16 GetBrowserListTitle(content::WebContents* web_contents) const; | 56 string16 GetBrowserListTitle(content::WebContents* web_contents) const; |
| 54 | 57 |
| 55 // Check if the given |web_contents| is in incognito mode. | 58 // Check if the given |web_contents| is in incognito mode. |
| 56 bool IsIncognito(content::WebContents* web_contents) const; | 59 bool IsIncognito(content::WebContents* web_contents) const; |
| 57 | 60 |
| 58 // Activate a browser - or advance to the next one on the list. | 61 // Activate a browser - or advance to the next one on the list. |
| 59 void ActivateOrAdvanceToNextBrowser(); | 62 void ActivateOrAdvanceToNextBrowser(); |
| 60 | 63 |
| 64 // Returns true when the given |browser| is listed in the browser application |
| 65 // list. |
| 66 bool IsBrowserRepresentedInBrowserList(Browser* browser); |
| 67 |
| 61 Profile* profile_; | 68 Profile* profile_; |
| 62 | 69 |
| 63 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); | 70 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); |
| 64 }; | 71 }; |
| 65 | 72 |
| 66 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ | 73 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ |
| OLD | NEW |