OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_LOGIN_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/login/user.h" | 10 #include "chrome/browser/chromeos/login/user.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 }; | 33 }; |
34 | 34 |
35 // TODO(nkostylev): Refactor and move this observer out of UserManager. | 35 // TODO(nkostylev): Refactor and move this observer out of UserManager. |
36 // Observer interface that defines methods used to notify on user session / | 36 // Observer interface that defines methods used to notify on user session / |
37 // active user state changes. Default implementation is empty. | 37 // active user state changes. Default implementation is empty. |
38 class UserSessionStateObserver { | 38 class UserSessionStateObserver { |
39 public: | 39 public: |
40 // Called when active user has changed. | 40 // Called when active user has changed. |
41 virtual void ActiveUserChanged(const User* active_user); | 41 virtual void ActiveUserChanged(const User* active_user); |
42 | 42 |
| 43 // Called when another user got added to the existing session. |
| 44 virtual void UserAddedToSession(const User* added_user); |
| 45 |
43 // Called right before notifying on user change so that those who rely | 46 // Called right before notifying on user change so that those who rely |
44 // on user_id hash would be accessing up-to-date value. | 47 // on user_id hash would be accessing up-to-date value. |
45 virtual void ActiveUserHashChanged(const std::string& hash); | 48 virtual void ActiveUserHashChanged(const std::string& hash); |
46 | 49 |
47 // Called when UserManager finishes restoring user sessions after crash. | 50 // Called when UserManager finishes restoring user sessions after crash. |
48 virtual void PendingUserSessionsRestoreFinished(); | 51 virtual void PendingUserSessionsRestoreFinished(); |
49 | 52 |
50 protected: | 53 protected: |
51 virtual ~UserSessionStateObserver(); | 54 virtual ~UserSessionStateObserver(); |
52 }; | 55 }; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 ScopedTestUserManager(); | 410 ScopedTestUserManager(); |
408 ~ScopedTestUserManager(); | 411 ~ScopedTestUserManager(); |
409 | 412 |
410 private: | 413 private: |
411 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); | 414 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); |
412 }; | 415 }; |
413 | 416 |
414 } // namespace chromeos | 417 } // namespace chromeos |
415 | 418 |
416 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 419 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
OLD | NEW |