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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h
index 420c1cc8d977bcc09c4c0a758afc9145d7a9990a..3ad8810e4b5a69794006add798d02a0894a7b705 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h
@@ -5,19 +5,18 @@
#ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
#define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_MUS_H_
+#include <map>
#include <memory>
+#include <string>
#include "base/macros.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
-class ChromeMashShelfController;
+class ChromeShelfItemDelegate;
class ChromeLauncherControllerMus : public ChromeLauncherController {
public:
- // Create a ChromeLauncherControllerMus instance and set it as the
- // ChromeLauncherController singleton.
- static ChromeLauncherController* CreateInstance();
-
+ ChromeLauncherControllerMus();
~ChromeLauncherControllerMus() override;
// ChromeLauncherController:
@@ -40,9 +39,6 @@ class ChromeLauncherControllerMus : public ChromeLauncherController {
void Close(ash::ShelfID id) override;
bool IsOpen(ash::ShelfID id) override;
bool IsPlatformApp(ash::ShelfID id) override;
- void LaunchApp(const std::string& app_id,
- ash::LaunchSource source,
- int event_flags) override;
void ActivateApp(const std::string& app_id,
ash::LaunchSource source,
int event_flags) override;
@@ -52,7 +48,6 @@ class ChromeLauncherControllerMus : public ChromeLauncherController {
bool IsWindowedAppInLauncher(const std::string& app_id) override;
void SetLaunchType(ash::ShelfID id,
extensions::LaunchType launch_type) override;
- Profile* GetProfile() override;
void UpdateAppState(content::WebContents* contents,
AppState app_state) override;
ash::ShelfID GetShelfIDForWebContents(
@@ -85,10 +80,16 @@ class ChromeLauncherControllerMus : public ChromeLauncherController {
void OnUserProfileReadyToSwitch(Profile* profile) override;
ArcAppDeferredLauncherController* GetArcDeferredLauncher() override;
+ // AppIconLoaderDelegate:
+ void OnAppImageUpdated(const std::string& app_id,
+ const gfx::ImageSkia& image) override;
+
private:
- ChromeLauncherControllerMus();
+ // Pin the items set in the current profile's preferences.
+ void PinAppsFromPrefs();
- std::unique_ptr<ChromeMashShelfController> shelf_controller_;
+ std::map<std::string, std::unique_ptr<ChromeShelfItemDelegate>>
+ app_id_to_item_delegate_;
DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerMus);
};

Powered by Google App Engine
This is Rietveld 408576698