| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_WS_USER_ID_TRACKER_H_ | 5 #ifndef SERVICES_UI_WS_USER_ID_TRACKER_H_ |
| 6 #define SERVICES_UI_WS_USER_ID_TRACKER_H_ | 6 #define SERVICES_UI_WS_USER_ID_TRACKER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 void AddObserver(UserIdTrackerObserver* observer); | 38 void AddObserver(UserIdTrackerObserver* observer); |
| 39 void RemoveObserver(UserIdTrackerObserver* observer); | 39 void RemoveObserver(UserIdTrackerObserver* observer); |
| 40 | 40 |
| 41 void Bind(mojom::UserAccessManagerRequest request); | 41 void Bind(mojom::UserAccessManagerRequest request); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 using UserIdSet = std::set<UserId>; | 44 using UserIdSet = std::set<UserId>; |
| 45 | 45 |
| 46 // mojom::UserAccessManager: | 46 // mojom::UserAccessManager: |
| 47 void SetActiveUser(const mojo::String& user_id) override; | 47 void SetActiveUser(const std::string& user_id) override; |
| 48 | 48 |
| 49 base::ObserverList<UserIdTrackerObserver> observers_; | 49 base::ObserverList<UserIdTrackerObserver> observers_; |
| 50 | 50 |
| 51 UserIdSet ids_; | 51 UserIdSet ids_; |
| 52 UserId active_id_; | 52 UserId active_id_; |
| 53 | 53 |
| 54 mojo::BindingSet<mojom::UserAccessManager> bindings_; | 54 mojo::BindingSet<mojom::UserAccessManager> bindings_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(UserIdTracker); | 56 DISALLOW_COPY_AND_ASSIGN(UserIdTracker); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace ws | 59 } // namespace ws |
| 60 } // namespace ui | 60 } // namespace ui |
| 61 | 61 |
| 62 #endif // SERVICES_UI_WS_USER_ID_TRACKER_H_ | 62 #endif // SERVICES_UI_WS_USER_ID_TRACKER_H_ |
| OLD | NEW |