Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / ash / multi_user / multi_user_window_manager.h
index a76091d..3677465 100644 (file)
@@ -37,6 +37,22 @@ class MultiUserWindowManagerChromeOS;
 // - 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.
@@ -110,6 +126,10 @@ class MultiUserWindowManager {
   // modules.
   virtual void AddUser(Profile* profile) = 0;
 
+  // Manages observers.
+  virtual void AddObserver(Observer* observer) = 0;
+  virtual void RemoveObserver(Observer* observer) = 0;
+
  protected:
   virtual ~MultiUserWindowManager() {}