| Index: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
|
| diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
|
| index 6471578a3e35a1cc3482f64042e50dffac8f11d0..394bcb98e63fa946b70e49b359ea229873223f0f 100644
|
| --- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
|
| +++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
|
| @@ -8,9 +8,9 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "ash/public/cpp/shelf_item_delegate.h"
|
| #include "base/macros.h"
|
| #include "base/time/time.h"
|
| -#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
|
| #include "url/gurl.h"
|
|
|
| class Browser;
|
| @@ -24,27 +24,24 @@ namespace extensions {
|
| class Extension;
|
| }
|
|
|
| -class ChromeLauncherController;
|
| -
|
| // Item controller for an app shortcut. Shortcuts track app and launcher ids,
|
| // but do not have any associated windows (opening a shortcut will replace the
|
| -// item with the appropriate LauncherItemController type).
|
| -class AppShortcutLauncherItemController : public LauncherItemController {
|
| +// item with the appropriate ash::ShelfItemDelegate type).
|
| +class AppShortcutLauncherItemController : public ash::ShelfItemDelegate {
|
| public:
|
| ~AppShortcutLauncherItemController() override;
|
|
|
| - static AppShortcutLauncherItemController* Create(
|
| - const ash::AppLaunchId& app_launch_id,
|
| - ChromeLauncherController* controller);
|
| + static std::unique_ptr<AppShortcutLauncherItemController> Create(
|
| + const ash::AppLaunchId& app_launch_id);
|
|
|
| std::vector<content::WebContents*> GetRunningApplications();
|
|
|
| - // LauncherItemController overrides:
|
| + // ash::ShelfItemDelegate overrides:
|
| void ItemSelected(std::unique_ptr<ui::Event> event,
|
| int64_t display_id,
|
| ash::ShelfLaunchSource source,
|
| const ItemSelectedCallback& callback) override;
|
| - MenuItemList GetAppMenuItems(int event_flags) override;
|
| + ash::MenuItemList GetAppMenuItems(int event_flags) override;
|
| void ExecuteCommand(uint32_t command_id, int32_t event_flags) override;
|
| void Close() override;
|
|
|
| @@ -54,11 +51,9 @@ class AppShortcutLauncherItemController : public LauncherItemController {
|
| // Set the refocus url pattern. Used by unit tests.
|
| void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; }
|
|
|
| - ChromeLauncherController* controller() { return chrome_launcher_controller_; }
|
| -
|
| protected:
|
| - AppShortcutLauncherItemController(const ash::AppLaunchId& app_launch_id,
|
| - ChromeLauncherController* controller);
|
| + explicit AppShortcutLauncherItemController(
|
| + const ash::AppLaunchId& app_launch_id);
|
|
|
| private:
|
| // Get the last running application.
|
| @@ -94,8 +89,6 @@ class AppShortcutLauncherItemController : public LauncherItemController {
|
| // keeping track of the last launch attempt.
|
| base::Time last_launch_attempt_;
|
|
|
| - ChromeLauncherController* chrome_launcher_controller_;
|
| -
|
| // The cached list of open app web contents shown in an application menu.
|
| std::vector<content::WebContents*> app_menu_items_;
|
|
|
|
|