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> |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 class Profile; | 13 |
| 14 namespace content { |
| 15 class BrowserContext; |
| 16 } |
14 | 17 |
15 namespace aura { | 18 namespace aura { |
16 class Window; | 19 class Window; |
17 } | 20 } |
18 | 21 |
19 namespace chrome { | 22 namespace chrome { |
20 | 23 |
21 class MultiUserWindowManagerChromeOS; | 24 class MultiUserWindowManagerChromeOS; |
22 | 25 |
23 // The MultiUserWindowManager manages windows from multiple users by presenting | 26 // The MultiUserWindowManager manages windows from multiple users by presenting |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool AreWindowsSharedAmongUsers() = 0; | 111 virtual bool AreWindowsSharedAmongUsers() = 0; |
109 | 112 |
110 // Get the owners for the visible windows and set them to |user_ids|. | 113 // Get the owners for the visible windows and set them to |user_ids|. |
111 virtual void GetOwnersOfVisibleWindows(std::set<std::string>* user_ids) = 0; | 114 virtual void GetOwnersOfVisibleWindows(std::set<std::string>* user_ids) = 0; |
112 | 115 |
113 // A query call for a given window to see if it is on the given user's | 116 // A query call for a given window to see if it is on the given user's |
114 // desktop. | 117 // desktop. |
115 virtual bool IsWindowOnDesktopOfUser(aura::Window* window, | 118 virtual bool IsWindowOnDesktopOfUser(aura::Window* window, |
116 const std::string& user_id) = 0; | 119 const std::string& user_id) = 0; |
117 | 120 |
| 121 // Whether or not the window's title should show the avatar. On chromeos, |
| 122 // this is true when the owner of the window is different from the owner of |
| 123 // the desktop. |
| 124 virtual bool ShouldShowAvatar(aura::Window* window) = 0; |
| 125 |
118 // Get the user on which the window is currently shown. If an empty string is | 126 // Get the user on which the window is currently shown. If an empty string is |
119 // passed back the window will be presented for every user. | 127 // passed back the window will be presented for every user. |
120 virtual const std::string& GetUserPresentingWindow(aura::Window* window) = 0; | 128 virtual const std::string& GetUserPresentingWindow(aura::Window* window) = 0; |
121 | 129 |
122 // Adds user to monitor starting and running V1/V2 application windows. | 130 // Adds user to monitor starting and running V1/V2 application windows. |
123 // Returns immediately if the user (identified by a |profile|) is already | 131 // Returns immediately if the user (identified by a |profile|) is already |
124 // known to the manager. Note: This function is not implemented as a | 132 // known to the manager. Note: This function is not implemented as a |
125 // SessionStateObserver to coordinate the timing of the addition with other | 133 // SessionStateObserver to coordinate the timing of the addition with other |
126 // modules. | 134 // modules. |
127 virtual void AddUser(Profile* profile) = 0; | 135 virtual void AddUser(content::BrowserContext* profile) = 0; |
128 | 136 |
129 // Manages observers. | 137 // Manages observers. |
130 virtual void AddObserver(Observer* observer) = 0; | 138 virtual void AddObserver(Observer* observer) = 0; |
131 virtual void RemoveObserver(Observer* observer) = 0; | 139 virtual void RemoveObserver(Observer* observer) = 0; |
132 | 140 |
133 protected: | 141 protected: |
134 virtual ~MultiUserWindowManager() {} | 142 virtual ~MultiUserWindowManager() {} |
135 | 143 |
136 private: | 144 private: |
137 // Caching the current multi profile mode since the detection is expensive. | 145 // Caching the current multi profile mode since the detection is expensive. |
138 static MultiProfileMode multi_user_mode_; | 146 static MultiProfileMode multi_user_mode_; |
139 }; | 147 }; |
140 | 148 |
141 } // namespace chrome | 149 } // namespace chrome |
142 | 150 |
143 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ | 151 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_H_ |
OLD | NEW |