Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.h |
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h |
| index e6a1c0bee8ddec7f09f6673cbbadea57bb29bc8b..62699f9a10b5ec78990eeee419a974ead1393efa 100644 |
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h |
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h |
| @@ -24,6 +24,7 @@ |
| #include "build/build_config.h" |
| #include "chrome/browser/ui/app_icon_loader.h" |
| #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| +#include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" |
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" |
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" |
| @@ -88,7 +89,8 @@ class ChromeLauncherController |
| public syncable_prefs::PrefServiceSyncableObserver, |
| public AppSyncUIStateObserver, |
| public LauncherAppUpdater::Delegate, |
| - public ash::ShelfItemDelegateManagerObserver { |
| + public ash::ShelfItemDelegateManagerObserver, |
| + public app_list::AppListSyncableService::Observer { |
| public: |
| // Indicates if a shelf item is incognito or not. |
| enum IncognitoState { |
| @@ -212,10 +214,7 @@ class ChromeLauncherController |
| // incognito window. |
| void CreateNewIncognitoWindow(); |
| - // Updates the pinned pref state. The pinned state consists of a list pref. |
| - // Each item of the list is a dictionary. The key |kAppIDPath| gives the |
| - // id of the app. |
| - void PersistPinnedState(); |
| + void UpdatePinnedPosition(ash::ShelfID id); |
| // Accessor to the currently loaded profile. Note that in multi profile use |
| // cases this might change over time. |
| @@ -290,6 +289,9 @@ class ChromeLauncherController |
| void OnAppImageUpdated(const std::string& app_id, |
| const gfx::ImageSkia& image) override; |
| + // app_list::AppListSyncableService::Observer: |
| + void OnSyncModelUpdated() override; |
| + |
| // Called when the active user has changed. |
| void ActiveUserChanged(const std::string& user_email); |
| @@ -458,23 +460,8 @@ class ChromeLauncherController |
| // Check if the given |web_contents| is in incognito mode. |
| bool IsIncognito(const content::WebContents* web_contents) const; |
| - // Update browser shortcut's index. |
| - void PersistChromeItemIndex(int index); |
|
khmel
2016/06/09 21:40:22
No longer used, it position specified by ordinal n
|
| - |
| - // Depending on the provided flags, move either the chrome icon, the app icon |
| - // or none to the given |target_index|. The provided |chrome_index| and |
| - // |app_list_index| locations will get adjusted within this call to finalize |
| - // the action and to make sure that the other item can still be moved |
| - // afterwards (index adjustments). |
| - void MoveChromeOrApplistToFinalPosition( |
|
khmel
2016/06/09 21:40:22
No longer used. App list is always at pos 0 and Ch
|
| - bool is_chrome, |
| - bool is_app_list, |
| - int target_index, |
| - int* chrome_index, |
| - int* app_list_index); |
| - |
| // Finds the index of where to insert the next item. |
| - int FindInsertionPoint(bool is_app_list); |
| + int FindInsertionPoint(); |
| // Get the browser shortcut's index in the shelf using the current's systems |
| // configuration of pinned and known (but not running) apps. |
| @@ -502,7 +489,7 @@ class ChromeLauncherController |
| ash::ShelfModel* model_; |
| - ash::ShelfItemDelegateManager* item_delegate_manager_; |
| + ash::ShelfItemDelegateManager* item_delegate_manager_ = nullptr; |
| // Profile used for prefs and loading extensions. This is NOT necessarily the |
| // profile new windows are created with. |
| @@ -529,7 +516,7 @@ class ChromeLauncherController |
| PrefChangeRegistrar pref_change_registrar_; |
| - AppSyncUIState* app_sync_ui_state_; |
| + AppSyncUIState* app_sync_ui_state_ = nullptr; |
| // The owned browser status monitor. |
| std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_; |
| @@ -541,7 +528,7 @@ class ChromeLauncherController |
| std::unique_ptr<ArcAppDeferredLauncherController> arc_deferred_launcher_; |
| // If true, incoming pinned state changes should be ignored. |
| - bool ignore_persist_pinned_state_change_; |
| + bool ignore_persist_pinned_state_change_ = false; |
| // The list of running & un-pinned applications for different users on hidden |
| // desktops. |