OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CHROME_LAUNCHER_CONTROLLER_MUS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
12 | 12 |
13 class ChromeLauncherControllerMus : public ChromeLauncherController { | 13 class ChromeLauncherControllerMus : public ChromeLauncherController { |
14 public: | 14 public: |
15 ChromeLauncherControllerMus(); | 15 ChromeLauncherControllerMus(); |
16 ~ChromeLauncherControllerMus() override; | 16 ~ChromeLauncherControllerMus() override; |
17 | 17 |
18 // ChromeLauncherController: | 18 // ChromeLauncherController: |
19 ash::ShelfID CreateAppLauncherItem( | 19 ash::ShelfID CreateAppLauncherItem( |
20 std::unique_ptr<ash::ShelfItemDelegate> item_delegate, | 20 std::unique_ptr<ash::ShelfItemDelegate> item_delegate, |
21 ash::ShelfItemStatus status) override; | 21 ash::ShelfItemStatus status) override; |
22 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; | 22 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; |
23 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override; | 23 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override; |
24 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; | 24 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; |
25 void SetShelfItemDelegate( | |
26 ash::ShelfID id, | |
27 std::unique_ptr<ash::ShelfItemDelegate> item_delegate) override; | |
28 void CloseLauncherItem(ash::ShelfID id) override; | 25 void CloseLauncherItem(ash::ShelfID id) override; |
29 bool IsPinned(ash::ShelfID id) override; | 26 bool IsPinned(ash::ShelfID id) override; |
30 void SetV1AppStatus(const std::string& app_id, | 27 void SetV1AppStatus(const std::string& app_id, |
31 ash::ShelfItemStatus status) override; | 28 ash::ShelfItemStatus status) override; |
32 void Launch(ash::ShelfID id, int event_flags) override; | 29 void Launch(ash::ShelfID id, int event_flags) override; |
33 void Close(ash::ShelfID id) override; | 30 void Close(ash::ShelfID id) override; |
34 bool IsOpen(ash::ShelfID id) override; | 31 bool IsOpen(ash::ShelfID id) override; |
35 bool IsPlatformApp(ash::ShelfID id) override; | 32 bool IsPlatformApp(ash::ShelfID id) override; |
36 void ActivateApp(const std::string& app_id, | 33 void ActivateApp(const std::string& app_id, |
37 ash::ShelfLaunchSource source, | 34 ash::ShelfLaunchSource source, |
(...skipping 17 matching lines...) Expand all Loading... |
55 void ActivateShellApp(const std::string& app_id, int window_index) override; | 52 void ActivateShellApp(const std::string& app_id, int window_index) override; |
56 bool IsWebContentHandledByApplication(content::WebContents* web_contents, | 53 bool IsWebContentHandledByApplication(content::WebContents* web_contents, |
57 const std::string& app_id) override; | 54 const std::string& app_id) override; |
58 bool ContentCanBeHandledByGmailApp( | 55 bool ContentCanBeHandledByGmailApp( |
59 content::WebContents* web_contents) override; | 56 content::WebContents* web_contents) override; |
60 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; | 57 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; |
61 base::string16 GetAppListTitle( | 58 base::string16 GetAppListTitle( |
62 content::WebContents* web_contents) const override; | 59 content::WebContents* web_contents) const override; |
63 BrowserShortcutLauncherItemController* | 60 BrowserShortcutLauncherItemController* |
64 GetBrowserShortcutLauncherItemController() override; | 61 GetBrowserShortcutLauncherItemController() override; |
65 ash::ShelfItemDelegate* GetShelfItemDelegate(const ash::ShelfID id) override; | |
66 bool ShelfBoundsChangesProbablyWithUser( | 62 bool ShelfBoundsChangesProbablyWithUser( |
67 ash::WmShelf* shelf, | 63 ash::WmShelf* shelf, |
68 const AccountId& account_id) const override; | 64 const AccountId& account_id) const override; |
69 void OnUserProfileReadyToSwitch(Profile* profile) override; | 65 void OnUserProfileReadyToSwitch(Profile* profile) override; |
70 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; | 66 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; |
71 const std::string& GetLaunchIDForShelfID(ash::ShelfID id) override; | 67 const std::string& GetLaunchIDForShelfID(ash::ShelfID id) override; |
72 | 68 |
73 // AppIconLoaderDelegate: | 69 // AppIconLoaderDelegate: |
74 void OnAppImageUpdated(const std::string& app_id, | 70 void OnAppImageUpdated(const std::string& app_id, |
75 const gfx::ImageSkia& image) override; | 71 const gfx::ImageSkia& image) override; |
76 | 72 |
77 protected: | 73 protected: |
78 // ChromeLauncherController: | 74 // ChromeLauncherController: |
79 void OnInit() override; | 75 void OnInit() override; |
80 | 76 |
81 private: | 77 private: |
82 // Pin the items set in the current profile's preferences. | 78 // Pin the items set in the current profile's preferences. |
83 void PinAppsFromPrefs(); | 79 void PinAppsFromPrefs(); |
84 | 80 |
85 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus); | 81 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus); |
86 }; | 82 }; |
87 | 83 |
88 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ | 84 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ |
OLD | NEW |