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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // Unpin a locked application. This is an internal call which converts the | 429 // Unpin a locked application. This is an internal call which converts the |
430 // model type of the given app index from a shortcut into an unpinned running | 430 // model type of the given app index from a shortcut into an unpinned running |
431 // app. | 431 // app. |
432 void UnpinRunningAppInternal(int index); | 432 void UnpinRunningAppInternal(int index); |
433 | 433 |
434 // Re-syncs launcher model with prefs::kPinnedLauncherApps. | 434 // Re-syncs launcher model with prefs::kPinnedLauncherApps. |
435 void UpdateAppLaunchersFromPref(); | 435 void UpdateAppLaunchersFromPref(); |
436 | 436 |
437 // Persists the shelf auto-hide behavior to prefs. | 437 // Persists the shelf auto-hide behavior to prefs. |
438 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, | 438 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, |
439 aura::RootWindow* root_window); | 439 aura::Window* root_window); |
440 | 440 |
441 // Sets the shelf auto-hide behavior from prefs. | 441 // Sets the shelf auto-hide behavior from prefs. |
442 void SetShelfAutoHideBehaviorFromPrefs(); | 442 void SetShelfAutoHideBehaviorFromPrefs(); |
443 | 443 |
444 // Sets the shelf alignment from prefs. | 444 // Sets the shelf alignment from prefs. |
445 void SetShelfAlignmentFromPrefs(); | 445 void SetShelfAlignmentFromPrefs(); |
446 | 446 |
447 // Sets both of auto-hide behavior and alignment from prefs. | 447 // Sets both of auto-hide behavior and alignment from prefs. |
448 void SetShelfBehaviorsFromPrefs(); | 448 void SetShelfBehaviorsFromPrefs(); |
449 | 449 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // If true, incoming pinned state changes should be ignored. | 565 // If true, incoming pinned state changes should be ignored. |
566 bool ignore_persist_pinned_state_change_; | 566 bool ignore_persist_pinned_state_change_; |
567 | 567 |
568 // True if each user has an own desktop. | 568 // True if each user has an own desktop. |
569 bool multi_profile_desktop_separation_; | 569 bool multi_profile_desktop_separation_; |
570 | 570 |
571 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 571 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
572 }; | 572 }; |
573 | 573 |
574 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 574 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |