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

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

Issue 2771663002: mash: Refactor ChromeLauncherController's ShelfDelegate code. (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 <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(LauncherItemController* 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 LauncherItemController* controller) override;
26 void CloseLauncherItem(ash::ShelfID id) override; 26 void CloseLauncherItem(ash::ShelfID id) override;
27 void Pin(ash::ShelfID id) override;
28 void Unpin(ash::ShelfID id) override;
29 bool IsPinned(ash::ShelfID id) override; 27 bool IsPinned(ash::ShelfID id) override;
30 void TogglePinned(ash::ShelfID id) override;
31 void LockV1AppWithID(const std::string& app_id) override; 28 void LockV1AppWithID(const std::string& app_id) override;
32 void UnlockV1AppWithID(const std::string& app_id) override; 29 void UnlockV1AppWithID(const std::string& app_id) override;
33 void Launch(ash::ShelfID id, int event_flags) override; 30 void Launch(ash::ShelfID id, int event_flags) override;
34 void Close(ash::ShelfID id) override; 31 void Close(ash::ShelfID id) override;
35 bool IsOpen(ash::ShelfID id) override; 32 bool IsOpen(ash::ShelfID id) override;
36 bool IsPlatformApp(ash::ShelfID id) override; 33 bool IsPlatformApp(ash::ShelfID id) override;
37 void ActivateApp(const std::string& app_id, 34 void ActivateApp(const std::string& app_id,
38 ash::ShelfLaunchSource source, 35 ash::ShelfLaunchSource source,
39 int event_flags) override; 36 int event_flags) override;
40 void SetLauncherItemImage(ash::ShelfID shelf_id, 37 void SetLauncherItemImage(ash::ShelfID shelf_id,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void OnInit() override; 77 void OnInit() override;
81 78
82 private: 79 private:
83 // Pin the items set in the current profile's preferences. 80 // Pin the items set in the current profile's preferences.
84 void PinAppsFromPrefs(); 81 void PinAppsFromPrefs();
85 82
86 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus); 83 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus);
87 }; 84 };
88 85
89 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_ 86 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698