Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h

Issue 2791803002: mash: Move LauncherItemController to ash, rename ShelfItemDelegate. (Closed)
Patch Set: Move shelf_item_delegate to ash/public/cpp, cleanup. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(LauncherItemController* controller, 19 ash::ShelfID CreateAppLauncherItem(ash::ShelfItemDelegate* controller,
20 ash::ShelfItemStatus status) override; 20 ash::ShelfItemStatus status) override;
21 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; 21 const ash::ShelfItem* GetItem(ash::ShelfID id) const override;
22 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override; 22 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override;
23 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; 23 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override;
24 void SetItemController(ash::ShelfID id, 24 void SetItemController(ash::ShelfID id,
25 LauncherItemController* controller) override; 25 ash::ShelfItemDelegate* controller) override;
26 void CloseLauncherItem(ash::ShelfID id) override; 26 void CloseLauncherItem(ash::ShelfID id) override;
27 bool IsPinned(ash::ShelfID id) override; 27 bool IsPinned(ash::ShelfID id) override;
28 void SetV1AppStatus(const std::string& app_id, 28 void SetV1AppStatus(const std::string& app_id,
29 ash::ShelfItemStatus status) override; 29 ash::ShelfItemStatus status) override;
30 void Launch(ash::ShelfID id, int event_flags) override; 30 void Launch(ash::ShelfID id, int event_flags) override;
31 void Close(ash::ShelfID id) override; 31 void Close(ash::ShelfID id) override;
32 bool IsOpen(ash::ShelfID id) override; 32 bool IsOpen(ash::ShelfID id) override;
33 bool IsPlatformApp(ash::ShelfID id) override; 33 bool IsPlatformApp(ash::ShelfID id) override;
34 void ActivateApp(const std::string& app_id, 34 void ActivateApp(const std::string& app_id,
35 ash::ShelfLaunchSource source, 35 ash::ShelfLaunchSource source,
36 int event_flags) override; 36 int event_flags) override;
37 void SetLauncherItemImage(ash::ShelfID shelf_id, 37 void SetLauncherItemImage(ash::ShelfID shelf_id,
38 const gfx::ImageSkia& image) override; 38 const gfx::ImageSkia& image) override;
39 void UpdateAppState(content::WebContents* contents, 39 void UpdateAppState(content::WebContents* contents,
40 AppState app_state) override; 40 AppState app_state) override;
41 ash::ShelfID GetShelfIDForWebContents( 41 ash::ShelfID GetShelfIDForWebContents(
42 content::WebContents* contents) override; 42 content::WebContents* contents) override;
43 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override; 43 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override;
44 ash::ShelfAction ActivateWindowOrMinimizeIfActive( 44 ash::ShelfAction ActivateWindowOrMinimizeIfActive(
45 ui::BaseWindow* window, 45 ui::BaseWindow* window,
46 bool allow_minimize) override; 46 bool allow_minimize) override;
47 void ActiveUserChanged(const std::string& user_email) override; 47 void ActiveUserChanged(const std::string& user_email) override;
48 void AdditionalUserAddedToSession(Profile* profile) override; 48 void AdditionalUserAddedToSession(Profile* profile) override;
49 MenuItemList GetAppMenuItemsForTesting(const ash::ShelfItem& item) override; 49 ash::MenuItemList GetAppMenuItemsForTesting(
50 const ash::ShelfItem& item) override;
50 std::vector<content::WebContents*> GetV1ApplicationsFromAppId( 51 std::vector<content::WebContents*> GetV1ApplicationsFromAppId(
51 const std::string& app_id) override; 52 const std::string& app_id) override;
52 void ActivateShellApp(const std::string& app_id, int window_index) override; 53 void ActivateShellApp(const std::string& app_id, int window_index) override;
53 bool IsWebContentHandledByApplication(content::WebContents* web_contents, 54 bool IsWebContentHandledByApplication(content::WebContents* web_contents,
54 const std::string& app_id) override; 55 const std::string& app_id) override;
55 bool ContentCanBeHandledByGmailApp( 56 bool ContentCanBeHandledByGmailApp(
56 content::WebContents* web_contents) override; 57 content::WebContents* web_contents) override;
57 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; 58 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override;
58 base::string16 GetAppListTitle( 59 base::string16 GetAppListTitle(
59 content::WebContents* web_contents) const override; 60 content::WebContents* web_contents) const override;
60 BrowserShortcutLauncherItemController* 61 BrowserShortcutLauncherItemController*
61 GetBrowserShortcutLauncherItemController() override; 62 GetBrowserShortcutLauncherItemController() override;
62 LauncherItemController* GetLauncherItemController( 63 ash::ShelfItemDelegate* GetLauncherItemController(
63 const ash::ShelfID id) override; 64 const ash::ShelfID id) override;
64 bool ShelfBoundsChangesProbablyWithUser( 65 bool ShelfBoundsChangesProbablyWithUser(
65 ash::WmShelf* shelf, 66 ash::WmShelf* shelf,
66 const AccountId& account_id) const override; 67 const AccountId& account_id) const override;
67 void OnUserProfileReadyToSwitch(Profile* profile) override; 68 void OnUserProfileReadyToSwitch(Profile* profile) override;
68 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; 69 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override;
69 const std::string& GetLaunchIDForShelfID(ash::ShelfID id) override; 70 const std::string& GetLaunchIDForShelfID(ash::ShelfID id) override;
70 71
71 // AppIconLoaderDelegate: 72 // AppIconLoaderDelegate:
72 void OnAppImageUpdated(const std::string& app_id, 73 void OnAppImageUpdated(const std::string& app_id,
73 const gfx::ImageSkia& image) override; 74 const gfx::ImageSkia& image) override;
74 75
75 protected: 76 protected:
76 // ChromeLauncherController: 77 // ChromeLauncherController:
77 void OnInit() override; 78 void OnInit() override;
78 79
79 private: 80 private:
80 // Pin the items set in the current profile's preferences. 81 // Pin the items set in the current profile's preferences.
81 void PinAppsFromPrefs(); 82 void PinAppsFromPrefs();
82 83
83 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus); 84 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus);
84 }; 85 };
85 86
86 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ 87 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698