| 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 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 virtual bool IsVisible() const OVERRIDE; | 34 virtual bool IsVisible() const OVERRIDE; |
| 35 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; | 35 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; |
| 36 virtual bool Activate(ash::LaunchSource source) OVERRIDE; | 36 virtual bool Activate(ash::LaunchSource source) OVERRIDE; |
| 37 virtual void Close() OVERRIDE; | 37 virtual void Close() OVERRIDE; |
| 38 virtual ChromeLauncherAppMenuItems GetApplicationList( | 38 virtual ChromeLauncherAppMenuItems GetApplicationList( |
| 39 int event_flags) OVERRIDE; | 39 int event_flags) OVERRIDE; |
| 40 virtual bool ItemSelected(const ui::Event& event) OVERRIDE; | 40 virtual bool ItemSelected(const ui::Event& event) OVERRIDE; |
| 41 virtual base::string16 GetTitle() OVERRIDE; | 41 virtual base::string16 GetTitle() OVERRIDE; |
| 42 virtual ui::MenuModel* CreateContextMenu( | 42 virtual ui::MenuModel* CreateContextMenu( |
| 43 aura::Window* root_window) OVERRIDE; | 43 aura::Window* root_window) OVERRIDE; |
| 44 virtual ash::LauncherMenuModel* CreateApplicationMenu( | 44 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; |
| 45 int event_flags) OVERRIDE; | |
| 46 virtual bool IsDraggable() OVERRIDE; | 45 virtual bool IsDraggable() OVERRIDE; |
| 47 virtual bool ShouldShowTooltip() OVERRIDE; | 46 virtual bool ShouldShowTooltip() OVERRIDE; |
| 48 | 47 |
| 49 private: | 48 private: |
| 50 // Get the favicon for the browser list entry for |web_contents|. | 49 // Get the favicon for the browser list entry for |web_contents|. |
| 51 // Note that for incognito windows the incognito icon will be returned. | 50 // Note that for incognito windows the incognito icon will be returned. |
| 52 gfx::Image GetBrowserListIcon(content::WebContents* web_contents) const; | 51 gfx::Image GetBrowserListIcon(content::WebContents* web_contents) const; |
| 53 | 52 |
| 54 // Get the title for the browser list entry for |web_contents|. | 53 // Get the title for the browser list entry for |web_contents|. |
| 55 // If |web_contents| has not loaded, returns "Net Tab". | 54 // If |web_contents| has not loaded, returns "Net Tab". |
| 56 string16 GetBrowserListTitle(content::WebContents* web_contents) const; | 55 string16 GetBrowserListTitle(content::WebContents* web_contents) const; |
| 57 | 56 |
| 58 // Check if the given |web_contents| is in incognito mode. | 57 // Check if the given |web_contents| is in incognito mode. |
| 59 bool IsIncognito(content::WebContents* web_contents) const; | 58 bool IsIncognito(content::WebContents* web_contents) const; |
| 60 | 59 |
| 61 // Activate a browser - or advance to the next one on the list. | 60 // Activate a browser - or advance to the next one on the list. |
| 62 void ActivateOrAdvanceToNextBrowser(); | 61 void ActivateOrAdvanceToNextBrowser(); |
| 63 | 62 |
| 64 // Returns true when the given |browser| is listed in the browser application | 63 // Returns true when the given |browser| is listed in the browser application |
| 65 // list. | 64 // list. |
| 66 bool IsBrowserRepresentedInBrowserList(Browser* browser); | 65 bool IsBrowserRepresentedInBrowserList(Browser* browser); |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); | 67 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ | 70 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ |
| OLD | NEW |