| OLD | NEW |
| 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_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ChromeLauncherController* controller); | 39 ChromeLauncherController* controller); |
| 40 | 40 |
| 41 std::vector<content::WebContents*> GetRunningApplications(); | 41 std::vector<content::WebContents*> GetRunningApplications(); |
| 42 | 42 |
| 43 // LauncherItemController overrides: | 43 // LauncherItemController overrides: |
| 44 ash::ShelfAction ItemSelected(ui::EventType event_type, | 44 ash::ShelfAction ItemSelected(ui::EventType event_type, |
| 45 int event_flags, | 45 int event_flags, |
| 46 int64_t display_id, | 46 int64_t display_id, |
| 47 ash::ShelfLaunchSource source) override; | 47 ash::ShelfLaunchSource source) override; |
| 48 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; | 48 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override; |
| 49 void ExecuteCommand(uint32_t command_id, int event_flags) override; |
| 49 void Close() override; | 50 void Close() override; |
| 50 | 51 |
| 51 // Get the refocus url pattern, which can be used to identify this application | 52 // Get the refocus url pattern, which can be used to identify this application |
| 52 // from a URL link. | 53 // from a URL link. |
| 53 const GURL& refocus_url() const { return refocus_url_; } | 54 const GURL& refocus_url() const { return refocus_url_; } |
| 54 // Set the refocus url pattern. Used by unit tests. | 55 // Set the refocus url pattern. Used by unit tests. |
| 55 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; } | 56 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; } |
| 56 | 57 |
| 57 ChromeLauncherController* controller() { return chrome_launcher_controller_; } | 58 ChromeLauncherController* controller() { return chrome_launcher_controller_; } |
| 58 | 59 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool AllowNextLaunchAttempt(); | 91 bool AllowNextLaunchAttempt(); |
| 91 | 92 |
| 92 GURL refocus_url_; | 93 GURL refocus_url_; |
| 93 | 94 |
| 94 // Since V2 applications can be undetectable after launching, this timer is | 95 // Since V2 applications can be undetectable after launching, this timer is |
| 95 // keeping track of the last launch attempt. | 96 // keeping track of the last launch attempt. |
| 96 base::Time last_launch_attempt_; | 97 base::Time last_launch_attempt_; |
| 97 | 98 |
| 98 ChromeLauncherController* chrome_launcher_controller_; | 99 ChromeLauncherController* chrome_launcher_controller_; |
| 99 | 100 |
| 101 // The cached list of open app web contents shown in an application menu. |
| 102 std::vector<content::WebContents*> app_menu_items_; |
| 103 |
| 100 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController); | 104 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController); |
| 101 }; | 105 }; |
| 102 | 106 |
| 103 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_
H_ | 107 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_
H_ |
| OLD | NEW |