| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" | 9 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" |
| 10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 void SetShelfIDForBrowserWindowContents(Browser* browser, | 39 void SetShelfIDForBrowserWindowContents(Browser* browser, |
| 40 content::WebContents* web_contents); | 40 content::WebContents* web_contents); |
| 41 | 41 |
| 42 // Check if there is any active browsers windows. | 42 // Check if there is any active browsers windows. |
| 43 bool IsListOfActiveBrowserEmpty(); | 43 bool IsListOfActiveBrowserEmpty(); |
| 44 | 44 |
| 45 // LauncherItemController overrides: | 45 // LauncherItemController overrides: |
| 46 void Launch(ash::LaunchSource source, int event_flags) override; | 46 void Launch(ash::LaunchSource source, int event_flags) override; |
| 47 ShelfItemDelegate::PerformedAction Activate( | 47 ShelfItemDelegate::PerformedAction Activate( |
| 48 ash::LaunchSource source) override; | 48 ash::LaunchSource source) override; |
| 49 ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override; | |
| 50 ash::ShelfItemDelegate::PerformedAction ItemSelected( | 49 ash::ShelfItemDelegate::PerformedAction ItemSelected( |
| 51 const ui::Event& event) override; | 50 const ui::Event& event) override; |
| 52 ui::SimpleMenuModel* CreateApplicationMenu(int event_flags) override; | 51 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; |
| 53 void Close() override; | 52 void Close() override; |
| 54 | 53 |
| 55 private: | 54 private: |
| 56 // Get the favicon for the browser list entry for |web_contents|. | 55 // Get the favicon for the browser list entry for |web_contents|. |
| 57 // Note that for incognito windows the incognito icon will be returned. | 56 // Note that for incognito windows the incognito icon will be returned. |
| 58 gfx::Image GetBrowserListIcon(content::WebContents* web_contents) const; | 57 gfx::Image GetBrowserListIcon(content::WebContents* web_contents) const; |
| 59 | 58 |
| 60 // Get the title for the browser list entry for |web_contents|. | 59 // Get the title for the browser list entry for |web_contents|. |
| 61 // If |web_contents| has not loaded, returns "Net Tab". | 60 // If |web_contents| has not loaded, returns "Net Tab". |
| 62 base::string16 GetBrowserListTitle(content::WebContents* web_contents) const; | 61 base::string16 GetBrowserListTitle(content::WebContents* web_contents) const; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 75 | 74 |
| 76 // Get a list of active browsers. | 75 // Get a list of active browsers. |
| 77 BrowserList::BrowserVector GetListOfActiveBrowsers(); | 76 BrowserList::BrowserVector GetListOfActiveBrowsers(); |
| 78 | 77 |
| 79 ash::ShelfModel* shelf_model_; | 78 ash::ShelfModel* shelf_model_; |
| 80 | 79 |
| 81 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); | 80 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); |
| 82 }; | 81 }; |
| 83 | 82 |
| 84 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ | 83 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROL
LER_H_ |
| OLD | NEW |