| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 void PersistPinnedState(); | 245 void PersistPinnedState(); |
| 246 | 246 |
| 247 ash::LauncherModel* model(); | 247 ash::LauncherModel* model(); |
| 248 | 248 |
| 249 // Accessor to the currently loaded profile. Note that in multi profile use | 249 // Accessor to the currently loaded profile. Note that in multi profile use |
| 250 // cases this might change over time. | 250 // cases this might change over time. |
| 251 Profile* profile(); | 251 Profile* profile(); |
| 252 | 252 |
| 253 // Gets the shelf auto-hide behavior on |root_window|. | 253 // Gets the shelf auto-hide behavior on |root_window|. |
| 254 ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior( | 254 ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
| 255 aura::RootWindow* root_window) const; | 255 aura::Window* root_window) const; |
| 256 | 256 |
| 257 // Returns |true| if the user is allowed to modify the shelf auto-hide | 257 // Returns |true| if the user is allowed to modify the shelf auto-hide |
| 258 // behavior on |root_window|. | 258 // behavior on |root_window|. |
| 259 bool CanUserModifyShelfAutoHideBehavior(aura::RootWindow* root_window) const; | 259 bool CanUserModifyShelfAutoHideBehavior(aura::Window* root_window) const; |
| 260 | 260 |
| 261 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the | 261 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the |
| 262 // user is not allowed to modify the auto-hide behavior. | 262 // user is not allowed to modify the auto-hide behavior. |
| 263 void ToggleShelfAutoHideBehavior(aura::RootWindow* root_window); | 263 void ToggleShelfAutoHideBehavior(aura::Window* root_window); |
| 264 | 264 |
| 265 // The tab no longer represents its previously identified application. | 265 // The tab no longer represents its previously identified application. |
| 266 void RemoveTabFromRunningApp(content::WebContents* tab, | 266 void RemoveTabFromRunningApp(content::WebContents* tab, |
| 267 const std::string& app_id); | 267 const std::string& app_id); |
| 268 | 268 |
| 269 // Notify the controller that the state of an non platform app's tabs | 269 // Notify the controller that the state of an non platform app's tabs |
| 270 // have changed, | 270 // have changed, |
| 271 void UpdateAppState(content::WebContents* contents, AppState app_state); | 271 void UpdateAppState(content::WebContents* contents, AppState app_state); |
| 272 | 272 |
| 273 // Limits application refocusing to urls that match |url| for |id|. | 273 // Limits application refocusing to urls that match |url| for |id|. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 301 virtual void LauncherItemChanged(int index, | 301 virtual void LauncherItemChanged(int index, |
| 302 const ash::LauncherItem& old_item) OVERRIDE; | 302 const ash::LauncherItem& old_item) OVERRIDE; |
| 303 virtual void LauncherStatusChanged() OVERRIDE; | 303 virtual void LauncherStatusChanged() OVERRIDE; |
| 304 | 304 |
| 305 // content::NotificationObserver overrides: | 305 // content::NotificationObserver overrides: |
| 306 virtual void Observe(int type, | 306 virtual void Observe(int type, |
| 307 const content::NotificationSource& source, | 307 const content::NotificationSource& source, |
| 308 const content::NotificationDetails& details) OVERRIDE; | 308 const content::NotificationDetails& details) OVERRIDE; |
| 309 | 309 |
| 310 // ash::ShellObserver overrides: | 310 // ash::ShellObserver overrides: |
| 311 virtual void OnShelfAlignmentChanged(aura::RootWindow* root_window) OVERRIDE; | 311 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; |
| 312 | 312 |
| 313 // ash::DisplayController::Observer overrides: | 313 // ash::DisplayController::Observer overrides: |
| 314 virtual void OnDisplayConfigurationChanging() OVERRIDE; | 314 virtual void OnDisplayConfigurationChanging() OVERRIDE; |
| 315 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 315 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
| 316 | 316 |
| 317 // PrefServiceSyncableObserver overrides: | 317 // PrefServiceSyncableObserver overrides: |
| 318 virtual void OnIsSyncingChanged() OVERRIDE; | 318 virtual void OnIsSyncingChanged() OVERRIDE; |
| 319 | 319 |
| 320 // AppSyncUIStateObserver overrides: | 320 // AppSyncUIStateObserver overrides: |
| 321 virtual void OnAppSyncUIStatusChanged() OVERRIDE; | 321 virtual void OnAppSyncUIStatusChanged() OVERRIDE; |
| 322 | 322 |
| 323 // ExtensionEnableFlowDelegate overrides: | 323 // ExtensionEnableFlowDelegate overrides: |
| 324 virtual void ExtensionEnableFlowFinished() OVERRIDE; | 324 virtual void ExtensionEnableFlowFinished() OVERRIDE; |
| 325 virtual void ExtensionEnableFlowAborted(bool user_initiated) OVERRIDE; | 325 virtual void ExtensionEnableFlowAborted(bool user_initiated) OVERRIDE; |
| 326 | 326 |
| 327 // extensions::AppIconLoader overrides: | 327 // extensions::AppIconLoader overrides: |
| 328 virtual void SetAppImage(const std::string& app_id, | 328 virtual void SetAppImage(const std::string& app_id, |
| 329 const gfx::ImageSkia& image) OVERRIDE; | 329 const gfx::ImageSkia& image) OVERRIDE; |
| 330 | 330 |
| 331 // ash::ShelfLayoutManagerObserver overrides: | 331 // ash::ShelfLayoutManagerObserver overrides: |
| 332 virtual void OnAutoHideBehaviorChanged( | 332 virtual void OnAutoHideBehaviorChanged( |
| 333 aura::RootWindow* root_window, | 333 aura::Window* root_window, |
| 334 ash::ShelfAutoHideBehavior new_behavior) OVERRIDE; | 334 ash::ShelfAutoHideBehavior new_behavior) OVERRIDE; |
| 335 | 335 |
| 336 // Called when the active user has changed. | 336 // Called when the active user has changed. |
| 337 void ActiveUserChanged(const std::string& user_email); | 337 void ActiveUserChanged(const std::string& user_email); |
| 338 | 338 |
| 339 // Get the list of all running incarnations of this item. | 339 // Get the list of all running incarnations of this item. |
| 340 // |event_flags| specifies the flags which were set by the event which | 340 // |event_flags| specifies the flags which were set by the event which |
| 341 // triggered this menu generation. It can be used to generate different lists. | 341 // triggered this menu generation. It can be used to generate different lists. |
| 342 ChromeLauncherAppMenuItems GetApplicationList(const ash::LauncherItem& item, | 342 ChromeLauncherAppMenuItems GetApplicationList(const ash::LauncherItem& item, |
| 343 int event_flags); | 343 int event_flags); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // Unpin a locked application. This is an internal call which converts the | 426 // Unpin a locked application. This is an internal call which converts the |
| 427 // model type of the given app index from a shortcut into an unpinned running | 427 // model type of the given app index from a shortcut into an unpinned running |
| 428 // app. | 428 // app. |
| 429 void UnpinRunningAppInternal(int index); | 429 void UnpinRunningAppInternal(int index); |
| 430 | 430 |
| 431 // Re-syncs launcher model with prefs::kPinnedLauncherApps. | 431 // Re-syncs launcher model with prefs::kPinnedLauncherApps. |
| 432 void UpdateAppLaunchersFromPref(); | 432 void UpdateAppLaunchersFromPref(); |
| 433 | 433 |
| 434 // Persists the shelf auto-hide behavior to prefs. | 434 // Persists the shelf auto-hide behavior to prefs. |
| 435 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, | 435 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, |
| 436 aura::RootWindow* root_window); | 436 aura::Window* root_window); |
| 437 | 437 |
| 438 // Sets the shelf auto-hide behavior from prefs. | 438 // Sets the shelf auto-hide behavior from prefs. |
| 439 void SetShelfAutoHideBehaviorFromPrefs(); | 439 void SetShelfAutoHideBehaviorFromPrefs(); |
| 440 | 440 |
| 441 // Sets the shelf alignment from prefs. | 441 // Sets the shelf alignment from prefs. |
| 442 void SetShelfAlignmentFromPrefs(); | 442 void SetShelfAlignmentFromPrefs(); |
| 443 | 443 |
| 444 // Sets both of auto-hide behavior and alignment from prefs. | 444 // Sets both of auto-hide behavior and alignment from prefs. |
| 445 void SetShelfBehaviorsFromPrefs(); | 445 void SetShelfBehaviorsFromPrefs(); |
| 446 | 446 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 // A special observer class to detect user switches. | 556 // A special observer class to detect user switches. |
| 557 scoped_ptr<ChromeLauncherControllerUserSwitchObserver> user_switch_observer_; | 557 scoped_ptr<ChromeLauncherControllerUserSwitchObserver> user_switch_observer_; |
| 558 | 558 |
| 559 // If true, incoming pinned state changes should be ignored. | 559 // If true, incoming pinned state changes should be ignored. |
| 560 bool ignore_persist_pinned_state_change_; | 560 bool ignore_persist_pinned_state_change_; |
| 561 | 561 |
| 562 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 562 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 563 }; | 563 }; |
| 564 | 564 |
| 565 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 565 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |