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_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 MultiProfileMode mode); | 95 MultiProfileMode mode); |
96 | 96 |
97 // Assigns an owner to a passed window. Note that this window's parent should | 97 // Assigns an owner to a passed window. Note that this window's parent should |
98 // be a direct child of the root window. | 98 // be a direct child of the root window. |
99 // A user switch will automatically change the visibility - and - if the | 99 // A user switch will automatically change the visibility - and - if the |
100 // current user is not the owner it will immediately hidden. If the window | 100 // current user is not the owner it will immediately hidden. If the window |
101 // had already be registered this function will run into a DCHECK violation. | 101 // had already be registered this function will run into a DCHECK violation. |
102 virtual void SetWindowOwner(aura::Window* window, | 102 virtual void SetWindowOwner(aura::Window* window, |
103 const AccountId& account_id) = 0; | 103 const AccountId& account_id) = 0; |
104 | 104 |
| 105 // Marks the window as visible in the system. |
| 106 virtual void MarkWindowAsVisible(aura::Window* window) = 0; |
| 107 |
105 // See who owns this window. The return value is the user account id or an | 108 // See who owns this window. The return value is the user account id or an |
106 // empty AccountId if not assigned yet. | 109 // empty AccountId if not assigned yet. |
107 virtual const AccountId& GetWindowOwner(aura::Window* window) const = 0; | 110 virtual const AccountId& GetWindowOwner(aura::Window* window) const = 0; |
108 | 111 |
109 // Allows to show an owned window for another users. If the window is not | 112 // Allows to show an owned window for another users. If the window is not |
110 // owned, this call will return immediately. (The FileManager for example | 113 // owned, this call will return immediately. (The FileManager for example |
111 // might be available for every user and not belong explicitly to one). | 114 // might be available for every user and not belong explicitly to one). |
112 // Note that a window can only be shown on one desktop at a time. Note that | 115 // Note that a window can only be shown on one desktop at a time. Note that |
113 // when the window gets minimized, it will automatically fall back to the | 116 // when the window gets minimized, it will automatically fall back to the |
114 // owner's desktop. | 117 // owner's desktop. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 virtual ~MultiUserWindowManager() {} | 150 virtual ~MultiUserWindowManager() {} |
148 | 151 |
149 private: | 152 private: |
150 // Caching the current multi profile mode since the detection is expensive. | 153 // Caching the current multi profile mode since the detection is expensive. |
151 static MultiProfileMode multi_user_mode_; | 154 static MultiProfileMode multi_user_mode_; |
152 }; | 155 }; |
153 | 156 |
154 } // namespace chrome | 157 } // namespace chrome |
155 | 158 |
156 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ | 159 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ |
OLD | NEW |