// - All child windows will be owned by the same owner as its parent.
class MultiUserWindowManager {
public:
+ // Observer to notify of any window owner changes.
+ class Observer {
+ public:
+ // Invoked when the new window is created and the manager start to track its
+ // owner.
+ virtual void OnOwnerEntryAdded(aura::Window* window) {}
+ // Invoked when the owner of the window tracked by the manager is changed.
+ virtual void OnOwnerEntryChanged(aura::Window* window) {}
+ // Invoked when the window is destroyed and the manager stop to track its
+ // owner.
+ virtual void OnOwnerEntryRemoved(aura::Window* window) {}
+
+ protected:
+ virtual ~Observer() {}
+ };
+
// The multi profile mode in use.
enum MultiProfileMode {
MULTI_PROFILE_MODE_UNINITIALIZED, // Not initialized yet.
// modules.
virtual void AddUser(Profile* profile) = 0;
+ // Manages observers.
+ virtual void AddObserver(Observer* observer) = 0;
+ virtual void RemoveObserver(Observer* observer) = 0;
+
protected:
virtual ~MultiUserWindowManager() {}