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 25 matching lines...) Expand all Loading... |
36 void UpdateBrowserItemState(); | 36 void UpdateBrowserItemState(); |
37 | 37 |
38 // Sets the shelf id for the browser window if the browser is represented. | 38 // Sets the shelf id for the browser window if the browser is represented. |
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 ash::ShelfAction ItemSelected(ui::EventType event_type, | 46 void ItemSelected(std::unique_ptr<ui::Event> event, |
47 int event_flags, | 47 int64_t display_id, |
48 int64_t display_id, | 48 ash::ShelfLaunchSource source, |
49 ash::ShelfLaunchSource source) override; | 49 const ItemSelectedCallback& callback) override; |
50 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; | 50 MenuItemList GetAppMenuItems(int event_flags) override; |
51 void ExecuteCommand(uint32_t command_id, int event_flags) override; | 51 void ExecuteCommand(uint32_t command_id, int32_t event_flags) override; |
52 void Close() override; | 52 void Close() override; |
53 | 53 |
54 private: | 54 private: |
55 // Activate a browser - or advance to the next one on the list. | 55 // Activate a browser - or advance to the next one on the list. |
56 // Returns the action performed. Should be one of SHELF_ACTION_NONE, | 56 // Returns the action performed. Should be one of SHELF_ACTION_NONE, |
57 // SHELF_ACTION_WINDOW_ACTIVATED, or SHELF_ACTION_NEW_WINDOW_CREATED. | 57 // SHELF_ACTION_WINDOW_ACTIVATED, or SHELF_ACTION_NEW_WINDOW_CREATED. |
58 ash::ShelfAction ActivateOrAdvanceToNextBrowser(); | 58 ash::ShelfAction ActivateOrAdvanceToNextBrowser(); |
59 | 59 |
60 // Returns true when the given |browser| is listed in the browser application | 60 // Returns true when the given |browser| is listed in the browser application |
61 // list. | 61 // list. |
(...skipping 12 matching lines...) Expand all Loading... |
74 // The cached list of open browser windows shown in an application menu. | 74 // The cached list of open browser windows shown in an application menu. |
75 BrowserList::BrowserVector browser_menu_items_; | 75 BrowserList::BrowserVector browser_menu_items_; |
76 | 76 |
77 // Registers for notifications of closing browser windows. | 77 // Registers for notifications of closing browser windows. |
78 content::NotificationRegistrar registrar_; | 78 content::NotificationRegistrar registrar_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); | 80 DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController); |
81 }; | 81 }; |
82 | 82 |
83 #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 |