| 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 <memory> | 10 #include <memory> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 namespace extensions { | 61 namespace extensions { |
| 62 class Extension; | 62 class Extension; |
| 63 } | 63 } |
| 64 | 64 |
| 65 namespace ui { | 65 namespace ui { |
| 66 class BaseWindow; | 66 class BaseWindow; |
| 67 } | 67 } |
| 68 | 68 |
| 69 #if defined(OS_CHROMEOS) | |
| 70 class ChromeLauncherControllerUserSwitchObserver; | 69 class ChromeLauncherControllerUserSwitchObserver; |
| 71 #endif | |
| 72 | 70 |
| 73 // A list of the elements which makes up a simple menu description. | 71 // A list of the elements which makes up a simple menu description. |
| 74 typedef ScopedVector<ChromeLauncherAppMenuItem> ChromeLauncherAppMenuItems; | 72 typedef ScopedVector<ChromeLauncherAppMenuItem> ChromeLauncherAppMenuItems; |
| 75 | 73 |
| 76 // ChromeLauncherController manages the launcher items needed for content | 74 // ChromeLauncherController manages the launcher items needed for content |
| 77 // windows. Launcher items have a type, an optional app id, and a controller. | 75 // windows. Launcher items have a type, an optional app id, and a controller. |
| 78 // This incarnation groups running tabs/windows in application specific lists. | 76 // This incarnation groups running tabs/windows in application specific lists. |
| 79 // * Browser app windows have BrowserLauncherItemController, owned by the | 77 // * Browser app windows have BrowserLauncherItemController, owned by the |
| 80 // BrowserView instance. | 78 // BrowserView instance. |
| 81 // * App windows have AppWindowLauncherItemController, owned by | 79 // * App windows have AppWindowLauncherItemController, owned by |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 418 |
| 421 // Sets the shelf auto-hide behavior from prefs. | 419 // Sets the shelf auto-hide behavior from prefs. |
| 422 void SetShelfAutoHideBehaviorFromPrefs(); | 420 void SetShelfAutoHideBehaviorFromPrefs(); |
| 423 | 421 |
| 424 // Sets the shelf alignment from prefs. | 422 // Sets the shelf alignment from prefs. |
| 425 void SetShelfAlignmentFromPrefs(); | 423 void SetShelfAlignmentFromPrefs(); |
| 426 | 424 |
| 427 // Sets both of auto-hide behavior and alignment from prefs. | 425 // Sets both of auto-hide behavior and alignment from prefs. |
| 428 void SetShelfBehaviorsFromPrefs(); | 426 void SetShelfBehaviorsFromPrefs(); |
| 429 | 427 |
| 430 #if defined(OS_CHROMEOS) | |
| 431 // Sets whether the virtual keyboard is enabled from prefs. | 428 // Sets whether the virtual keyboard is enabled from prefs. |
| 432 void SetVirtualKeyboardBehaviorFromPrefs(); | 429 void SetVirtualKeyboardBehaviorFromPrefs(); |
| 433 #endif // defined(OS_CHROMEOS) | |
| 434 | 430 |
| 435 // Returns the shelf item status for the given |app_id|, which can be either | 431 // Returns the shelf item status for the given |app_id|, which can be either |
| 436 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an | 432 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an |
| 437 // app) or STATUS_CLOSED. | 433 // app) or STATUS_CLOSED. |
| 438 ash::ShelfItemStatus GetAppState(const std::string& app_id); | 434 ash::ShelfItemStatus GetAppState(const std::string& app_id); |
| 439 | 435 |
| 440 // Creates an app launcher to insert at |index|. Note that |index| may be | 436 // Creates an app launcher to insert at |index|. Note that |index| may be |
| 441 // adjusted by the model to meet ordering constraints. | 437 // adjusted by the model to meet ordering constraints. |
| 442 // The |shelf_item_type| will be set into the ShelfModel. | 438 // The |shelf_item_type| will be set into the ShelfModel. |
| 443 ash::ShelfID InsertAppLauncherItem(LauncherItemController* controller, | 439 ash::ShelfID InsertAppLauncherItem(LauncherItemController* controller, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 // Used to handle app load/unload events. | 521 // Used to handle app load/unload events. |
| 526 std::vector<std::unique_ptr<LauncherAppUpdater>> app_updaters_; | 522 std::vector<std::unique_ptr<LauncherAppUpdater>> app_updaters_; |
| 527 | 523 |
| 528 PrefChangeRegistrar pref_change_registrar_; | 524 PrefChangeRegistrar pref_change_registrar_; |
| 529 | 525 |
| 530 AppSyncUIState* app_sync_ui_state_; | 526 AppSyncUIState* app_sync_ui_state_; |
| 531 | 527 |
| 532 // The owned browser status monitor. | 528 // The owned browser status monitor. |
| 533 std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_; | 529 std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_; |
| 534 | 530 |
| 535 #if defined(OS_CHROMEOS) | |
| 536 // A special observer class to detect user switches. | 531 // A special observer class to detect user switches. |
| 537 std::unique_ptr<ChromeLauncherControllerUserSwitchObserver> | 532 std::unique_ptr<ChromeLauncherControllerUserSwitchObserver> |
| 538 user_switch_observer_; | 533 user_switch_observer_; |
| 539 #endif | |
| 540 | 534 |
| 541 // If true, incoming pinned state changes should be ignored. | 535 // If true, incoming pinned state changes should be ignored. |
| 542 bool ignore_persist_pinned_state_change_; | 536 bool ignore_persist_pinned_state_change_; |
| 543 | 537 |
| 544 // The list of running & un-pinned applications for different users on hidden | 538 // The list of running & un-pinned applications for different users on hidden |
| 545 // desktops. | 539 // desktops. |
| 546 typedef std::vector<std::string> RunningAppListIds; | 540 typedef std::vector<std::string> RunningAppListIds; |
| 547 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 541 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 548 RunningAppListIdMap last_used_running_application_order_; | 542 RunningAppListIdMap last_used_running_application_order_; |
| 549 | 543 |
| 550 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 544 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 551 }; | 545 }; |
| 552 | 546 |
| 553 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 547 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |