| Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
|
| diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
|
| index 1cc1a0c4e54ac5fb1940e49aafdcc22eee30672e..644d5ca3f8b52ee1d0e45fce495ba75e402935de 100644
|
| --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
|
| +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/observer_list.h"
|
| +#include "base/timer/timer.h"
|
| #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -39,7 +40,6 @@
|
| namespace chrome {
|
|
|
| class AppObserver;
|
| -class UserSwichAnimatorChromeOS;
|
|
|
| // This ChromeOS implementation of the MultiUserWindowManager interface is
|
| // detecting app and browser creations, tagging their windows automatically and
|
| @@ -112,8 +112,9 @@
|
| // Returns the current user for unit tests.
|
| const std::string& GetCurrentUserForTest();
|
|
|
| - protected:
|
| - friend class UserSwichAnimatorChromeOS;
|
| + private:
|
| + friend class ::MultiUserNotificationBlockerChromeOSTest;
|
| + friend class ash::test::MultiUserWindowManagerChromeOSTest;
|
|
|
| class WindowEntry {
|
| public:
|
| @@ -155,11 +156,34 @@
|
| };
|
|
|
| typedef std::map<aura::Window*, WindowEntry*> WindowToEntryMap;
|
| + typedef std::map<std::string, AppObserver*> UserIDToAppWindowObserver;
|
| + typedef std::map<aura::Window*, bool> TransientWindowToVisibility;
|
| +
|
| + // The animation step for the user change animation. First the old user gets
|
| + // hidden and then the new one gets presented.
|
| + enum AnimationStep {
|
| + HIDE_OLD_USER,
|
| + SHOW_NEW_USER
|
| + };
|
|
|
| // Show a window for a user without switching the user.
|
| // Returns true when the window moved to a new desktop.
|
| bool ShowWindowForUserIntern(aura::Window* window,
|
| const std::string& user_id);
|
| +
|
| + // Start the user change animation required for |animation_step|.
|
| + // Note that a call with SHOW_NEW_USER will finalize the animation and kill
|
| + // the timer (if there is one).
|
| + void TransitionUser(AnimationStep animtion_step);
|
| +
|
| + // Start the user wallpaper animations.
|
| + void TransitionWallpaper(AnimationStep animtion_step);
|
| +
|
| + // Start the user shelf animations.
|
| + void TransitionUserShelf(AnimationStep animtion_step);
|
| +
|
| + // Add a browser window to the system so that the owner can be remembered.
|
| + void AddBrowserWindow(Browser* browser);
|
|
|
| // Show / hide the given window. Note: By not doing this within the functions,
|
| // this allows to either switching to different ways to show/hide and / or to
|
| @@ -172,21 +196,6 @@
|
| bool visible,
|
| int animation_time_in_ms);
|
|
|
| - const WindowToEntryMap& window_to_entry() { return window_to_entry_; }
|
| - MultiUserNotificationBlockerChromeOS* notification_blocker() {
|
| - return notification_blocker_.get();
|
| - }
|
| -
|
| - private:
|
| - friend class ::MultiUserNotificationBlockerChromeOSTest;
|
| - friend class ash::test::MultiUserWindowManagerChromeOSTest;
|
| -
|
| - typedef std::map<std::string, AppObserver*> UserIDToAppWindowObserver;
|
| - typedef std::map<aura::Window*, bool> TransientWindowToVisibility;
|
| -
|
| - // Add a browser window to the system so that the owner can be remembered.
|
| - void AddBrowserWindow(Browser* browser);
|
| -
|
| // Show the window and its transient children. However - if a transient child
|
| // was turned invisible by some other operation, it will stay invisible.
|
| // Use the given |animation_time_in_ms| for transitioning.
|
| @@ -244,12 +253,13 @@
|
| // used is quite expensive.
|
| static MultiProfileMode multi_user_mode_;
|
|
|
| + // A timer which watches to executes the second part of a "user changed"
|
| + // animation. Note that this timer exists only during such an animation.
|
| + scoped_ptr<base::Timer> user_changed_animation_timer_;
|
| +
|
| // If true, all animations will be suppressed.
|
| bool animations_disabled_;
|
|
|
| - // The animation between users.
|
| - scoped_ptr<UserSwichAnimatorChromeOS> animation_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MultiUserWindowManagerChromeOS);
|
| };
|
|
|
|
|