| Index: chrome/browser/ui/ash/chrome_launcher_prefs.h
|
| diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.h b/chrome/browser/ui/ash/chrome_launcher_prefs.h
|
| index 9f1f5e18cf96332f30f2316e07dbd888cb60f4eb..f868c5964fcc2b62ba3b35cfa7184421e61ca977 100644
|
| --- a/chrome/browser/ui/ash/chrome_launcher_prefs.h
|
| +++ b/chrome/browser/ui/ash/chrome_launcher_prefs.h
|
| @@ -51,10 +51,27 @@ extern const char kShelfAlignmentBottom[];
|
| extern const char kShelfAlignmentLeft[];
|
| extern const char kShelfAlignmentRight[];
|
|
|
| +// A unique chrome launcher id used to identify a shelf item.
|
| +class AppLauncherId {
|
| + public:
|
| + explicit AppLauncherId(const std::string& app_id);
|
| + // This constructor is currently unused, but will be used in a follow-up CL.
|
| + AppLauncherId(const std::string& app_id, const std::string& launch_id);
|
| + ~AppLauncherId();
|
| +
|
| + const std::string& GetAsString() const { return app_launcher_id_; }
|
| +
|
| + bool operator==(const AppLauncherId& app_launcher_id) const;
|
| +
|
| + private:
|
| + // A unique chrome launcher id for a shelf item.
|
| + const std::string app_launcher_id_;
|
| +};
|
| +
|
| void RegisterChromeLauncherUserPrefs(
|
| user_prefs::PrefRegistrySyncable* registry);
|
|
|
| -base::DictionaryValue* CreateAppDict(const std::string& app_id);
|
| +base::DictionaryValue* CreateAppDict(const AppLauncherId& app_launcher_id);
|
|
|
| // Get or set the shelf auto hide behavior preference for a particular display.
|
| ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(PrefService* prefs,
|
| @@ -75,16 +92,17 @@ std::vector<std::string> GetPinnedAppsFromPrefs(
|
| LauncherControllerHelper* helper);
|
|
|
| // Removes information about pin position from sync model for the app.
|
| -void RemovePinPosition(Profile* profile, const std::string& app_id);
|
| -
|
| -// Updates information about pin position in sync model for the app |app_id|.
|
| -// |app_id_before| optionally specifies an app that exists right before the
|
| -// target app. |app_ids_after| optionally specifies sorted by position apps that
|
| -// exist right after the target app.
|
| -void SetPinPosition(Profile* profile,
|
| - const std::string& app_id,
|
| - const std::string& app_id_before,
|
| - const std::vector<std::string>& app_ids_after);
|
| +void RemovePinPosition(Profile* profile, const AppLauncherId& app_launcher_id);
|
| +
|
| +// Updates information about pin position in sync model for the app
|
| +// |app_launcher_id|. |app_launcher_id_before| optionally specifies an app that
|
| +// exists right before the target app. |app_launcher_ids_after| optionally
|
| +// specifies sorted by position apps that exist right after the target app.
|
| +void SetPinPosition(
|
| + Profile* profile,
|
| + const AppLauncherId& app_launcher_id,
|
| + const AppLauncherId& app_launcher_id_before,
|
| + const std::vector<std::unique_ptr<AppLauncherId>>& app_launcher_ids_after);
|
|
|
| // Used to propagate remote preferences to local during the first run.
|
| class ChromeLauncherPrefsObserver
|
|
|