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

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

Issue 2059963002: Mustash implementation of ChromeLauncherController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_mus_5
Patch Set: Addressing feedback. Created 4 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
12
13 class ChromeMashShelfController;
14
15 class ChromeLauncherControllerMus : public ChromeLauncherController {
16 public:
17 // Create a ChromeLauncherControllerMus instance and set it as the
18 // ChromeLauncherController singleton.
19 static ChromeLauncherController* CreateInstance();
20
21 ~ChromeLauncherControllerMus() override;
22
23 // ChromeLauncherController:
24 void Init() override;
25 ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller,
26 const std::string& app_id,
27 ash::ShelfItemStatus status) override;
28 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override;
29 void SetItemController(ash::ShelfID id,
30 LauncherItemController* controller) override;
31 void CloseLauncherItem(ash::ShelfID id) override;
32 void Pin(ash::ShelfID id) override;
33 void Unpin(ash::ShelfID id) override;
34 bool IsPinned(ash::ShelfID id) override;
35 void TogglePinned(ash::ShelfID id) override;
36 bool IsPinnable(ash::ShelfID id) const override;
37 void LockV1AppWithID(const std::string& app_id) override;
38 void UnlockV1AppWithID(const std::string& app_id) override;
39 void Launch(ash::ShelfID id, int event_flags) override;
40 void Close(ash::ShelfID id) override;
41 bool IsOpen(ash::ShelfID id) override;
42 bool IsPlatformApp(ash::ShelfID id) override;
43 void LaunchApp(const std::string& app_id,
44 ash::LaunchSource source,
45 int event_flags) override;
46 void ActivateApp(const std::string& app_id,
47 ash::LaunchSource source,
48 int event_flags) override;
49 extensions::LaunchType GetLaunchType(ash::ShelfID id) override;
50 void SetLauncherItemImage(ash::ShelfID shelf_id,
51 const gfx::ImageSkia& image) override;
52 bool IsWindowedAppInLauncher(const std::string& app_id) override;
53 void SetLaunchType(ash::ShelfID id,
54 extensions::LaunchType launch_type) override;
55 void PersistPinnedState() override;
56 Profile* GetProfile() override;
57 void UpdateAppState(content::WebContents* contents,
58 AppState app_state) override;
59 ash::ShelfID GetShelfIDForWebContents(
60 content::WebContents* contents) override;
61 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override;
62 const extensions::Extension* GetExtensionForAppID(
63 const std::string& app_id) const override;
64 ash::ShelfItemDelegate::PerformedAction ActivateWindowOrMinimizeIfActive(
65 ui::BaseWindow* window,
66 bool allow_minimize) override;
67 void ActiveUserChanged(const std::string& user_email) override;
68 void AdditionalUserAddedToSession(Profile* profile) override;
69 ChromeLauncherAppMenuItems GetApplicationList(const ash::ShelfItem& item,
70 int event_flags) override;
71 std::vector<content::WebContents*> GetV1ApplicationsFromAppId(
72 const std::string& app_id) override;
73 void ActivateShellApp(const std::string& app_id, int index) override;
74 bool IsWebContentHandledByApplication(content::WebContents* web_contents,
75 const std::string& app_id) override;
76 bool ContentCanBeHandledByGmailApp(
77 content::WebContents* web_contents) override;
78 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override;
79 base::string16 GetAppListTitle(
80 content::WebContents* web_contents) const override;
81 BrowserShortcutLauncherItemController*
82 GetBrowserShortcutLauncherItemController() override;
83 LauncherItemController* GetLauncherItemController(
84 const ash::ShelfID id) override;
85 bool IsBrowserFromActiveUser(Browser* browser) override;
86 bool ShelfBoundsChangesProbablyWithUser(
87 ash::Shelf* shelf,
88 const std::string& user_id) const override;
89 void OnUserProfileReadyToSwitch(Profile* profile) override;
90 AppListControllerDelegate::Pinnable GetPinnable(
91 const std::string& app_id) override;
92 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override;
93
94 private:
95 ChromeLauncherControllerMus();
96
97 std::unique_ptr<ChromeMashShelfController> shelf_controller_;
98
99 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus);
100 };
101
102 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698