Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h |
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h |
index 84999fa41cc25ead72128d2d30683ef5d94c29b0..55cd0e7b27776d1d57cca1b2cdc44876190e394c 100644 |
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h |
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h |
@@ -16,7 +16,6 @@ |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
#include "build/build_config.h" |
-#include "chrome/browser/ui/app_icon_loader.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_controller.h" |
@@ -26,7 +25,6 @@ |
class AppSyncUIState; |
class BrowserStatusMonitor; |
-class LauncherControllerHelper; |
class Profile; |
class AppWindowLauncherController; |
class TabContents; |
@@ -62,18 +60,12 @@ class ChromeLauncherControllerImpl |
public LauncherAppUpdater::Delegate, |
private ash::ShelfModelObserver, |
private ash::WindowTreeHostManager::Observer, |
- private AppIconLoaderDelegate, |
private AppSyncUIStateObserver, |
private app_list::AppListSyncableService::Observer { |
public: |
ChromeLauncherControllerImpl(Profile* profile, ash::ShelfModel* model); |
~ChromeLauncherControllerImpl() override; |
- // Create ChromeLauncherControllerImpl instance and set is as the |
- // ChromeLauncherController singleton. |
- static ChromeLauncherControllerImpl* CreateInstance(Profile* profile, |
- ash::ShelfModel* model); |
- |
// ChromeLauncherController: |
void Init() override; |
ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, |
@@ -94,9 +86,6 @@ class ChromeLauncherControllerImpl |
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; |
@@ -106,7 +95,6 @@ class ChromeLauncherControllerImpl |
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( |
@@ -138,8 +126,7 @@ class ChromeLauncherControllerImpl |
const AccountId& account_id) const override; |
void OnUserProfileReadyToSwitch(Profile* profile) override; |
ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; |
- |
- void SetProfileForTest(Profile* profile); |
+ void AttachProfile(Profile* profile_to_attach) override; |
// Access to the BrowserStatusMonitor for tests. |
BrowserStatusMonitor* browser_status_monitor_for_test() { |
@@ -153,12 +140,6 @@ class ChromeLauncherControllerImpl |
} |
// ash::ShelfDelegate: |
- void OnShelfCreated(ash::WmShelf* shelf) override; |
- void OnShelfDestroyed(ash::WmShelf* shelf) override; |
- void OnShelfAlignmentChanged(ash::WmShelf* shelf) override; |
- void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override; |
- void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override; |
- void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override; |
ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
ash::ShelfID GetShelfIDForAppIDAndLaunchID( |
const std::string& app_id, |
@@ -183,10 +164,6 @@ class ChromeLauncherControllerImpl |
ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, |
int index); |
- // Sets LauncherControllerHelper/AppIconLoader for test, taking ownership. |
- void SetLauncherControllerHelperForTest(LauncherControllerHelper* helper); |
- void SetAppIconLoadersForTest( |
- std::vector<std::unique_ptr<AppIconLoader>>& loaders); |
const std::string& GetAppIdFromShelfIdForTest(ash::ShelfID id); |
private: |
@@ -236,15 +213,6 @@ class ChromeLauncherControllerImpl |
// Schedules re-sync of shelf model. |
void ScheduleUpdateAppLaunchersFromPref(); |
- // Sets the shelf auto-hide behavior from prefs. |
- void SetShelfAutoHideBehaviorFromPrefs(); |
- |
- // Sets the shelf alignment from prefs. |
- void SetShelfAlignmentFromPrefs(); |
- |
- // Sets both of auto-hide behavior and alignment from prefs. |
- void SetShelfBehaviorsFromPrefs(); |
- |
// Sets whether the virtual keyboard is enabled from prefs. |
void SetVirtualKeyboardBehaviorFromPrefs(); |
@@ -285,14 +253,9 @@ class ChromeLauncherControllerImpl |
void SetShelfItemDelegate(ash::ShelfID id, |
ash::ShelfItemDelegate* item_delegate); |
- // Attach to a specific profile. |
- void AttachProfile(Profile* profile); |
- |
// Forget the current profile to allow attaching to a new one. |
void ReleaseProfile(); |
- AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); |
- |
// ash::ShelfModelObserver: |
void ShelfItemAdded(int index) override; |
void ShelfItemRemoved(int index, ash::ShelfID id) override; |
@@ -320,10 +283,6 @@ class ChromeLauncherControllerImpl |
ash::ShelfModel* model_; |
- // Profile used for prefs and loading extensions. This is NOT necessarily the |
- // profile new windows are created with. |
- Profile* profile_; |
- |
// Controller items in this map are owned by |ShelfModel|. |
IDToItemControllerMap id_to_item_controller_map_; |
@@ -334,12 +293,6 @@ class ChromeLauncherControllerImpl |
std::vector<std::unique_ptr<AppWindowLauncherController>> |
app_window_controllers_; |
- // Used to get app info for tabs. |
- std::unique_ptr<LauncherControllerHelper> launcher_controller_helper_; |
- |
- // Used to load the images for app items. |
- std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
- |
// Used to handle app load/unload events. |
std::vector<std::unique_ptr<LauncherAppUpdater>> app_updaters_; |