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

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

Issue 2718563008: mash: Use mojo for ShelfItemDelegate and [app] MenuItem. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 <map>
9 #include <memory>
10 #include <string> 8 #include <string>
11 9
12 #include "base/macros.h" 10 #include "base/macros.h"
13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
14 12
15 class ChromeShelfItemDelegate;
16
17 class ChromeLauncherControllerMus : public ChromeLauncherController { 13 class ChromeLauncherControllerMus : public ChromeLauncherController {
18 public: 14 public:
19 ChromeLauncherControllerMus(); 15 ChromeLauncherControllerMus();
20 ~ChromeLauncherControllerMus() override; 16 ~ChromeLauncherControllerMus() override;
21 17
22 // ChromeLauncherController: 18 // ChromeLauncherController:
23 ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, 19 ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller,
24 const std::string& app_id, 20 const std::string& app_id,
25 ash::ShelfItemStatus status) override; 21 ash::ShelfItemStatus status) override;
26 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; 22 const ash::ShelfItem* GetItem(ash::ShelfID id) const override;
(...skipping 20 matching lines...) Expand all
47 void UpdateAppState(content::WebContents* contents, 43 void UpdateAppState(content::WebContents* contents,
48 AppState app_state) override; 44 AppState app_state) override;
49 ash::ShelfID GetShelfIDForWebContents( 45 ash::ShelfID GetShelfIDForWebContents(
50 content::WebContents* contents) override; 46 content::WebContents* contents) override;
51 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override; 47 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override;
52 ash::ShelfAction ActivateWindowOrMinimizeIfActive( 48 ash::ShelfAction ActivateWindowOrMinimizeIfActive(
53 ui::BaseWindow* window, 49 ui::BaseWindow* window,
54 bool allow_minimize) override; 50 bool allow_minimize) override;
55 void ActiveUserChanged(const std::string& user_email) override; 51 void ActiveUserChanged(const std::string& user_email) override;
56 void AdditionalUserAddedToSession(Profile* profile) override; 52 void AdditionalUserAddedToSession(Profile* profile) override;
57 ash::ShelfAppMenuItemList GetAppMenuItemsForTesting( 53 std::vector<ash::mojom::MenuItemPtr> GetAppMenuItemsForTesting(
58 const ash::ShelfItem& item) override; 54 const ash::ShelfItem& item) override;
59 std::vector<content::WebContents*> GetV1ApplicationsFromAppId( 55 std::vector<content::WebContents*> GetV1ApplicationsFromAppId(
60 const std::string& app_id) override; 56 const std::string& app_id) override;
61 void ActivateShellApp(const std::string& app_id, int window_index) override; 57 void ActivateShellApp(const std::string& app_id, int window_index) override;
62 bool IsWebContentHandledByApplication(content::WebContents* web_contents, 58 bool IsWebContentHandledByApplication(content::WebContents* web_contents,
63 const std::string& app_id) override; 59 const std::string& app_id) override;
64 bool ContentCanBeHandledByGmailApp( 60 bool ContentCanBeHandledByGmailApp(
65 content::WebContents* web_contents) override; 61 content::WebContents* web_contents) override;
66 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; 62 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override;
67 base::string16 GetAppListTitle( 63 base::string16 GetAppListTitle(
(...skipping 14 matching lines...) Expand all
82 const gfx::ImageSkia& image) override; 78 const gfx::ImageSkia& image) override;
83 79
84 protected: 80 protected:
85 // ChromeLauncherController: 81 // ChromeLauncherController:
86 void OnInit() override; 82 void OnInit() override;
87 83
88 private: 84 private:
89 // Pin the items set in the current profile's preferences. 85 // Pin the items set in the current profile's preferences.
90 void PinAppsFromPrefs(); 86 void PinAppsFromPrefs();
91 87
92 std::map<std::string, std::unique_ptr<ChromeShelfItemDelegate>>
93 app_id_to_item_delegate_;
94
95 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus); 88 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus);
96 }; 89 };
97 90
98 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ 91 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698