| 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_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ | 6 #define SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 friend class test::WindowManagerWindowTreeFactorySetTestApi; | 68 friend class test::WindowManagerWindowTreeFactorySetTestApi; |
| 69 | 69 |
| 70 // Called by WindowManagerWindowTreeFactory when CreateWindowTree() has | 70 // Called by WindowManagerWindowTreeFactory when CreateWindowTree() has |
| 71 // been called. | 71 // been called. |
| 72 void OnWindowManagerWindowTreeFactoryReady( | 72 void OnWindowManagerWindowTreeFactoryReady( |
| 73 WindowManagerWindowTreeFactory* factory); | 73 WindowManagerWindowTreeFactory* factory); |
| 74 | 74 |
| 75 // UserIdTrackerObserver: | 75 // UserIdTrackerObserver: |
| 76 void OnUserIdRemoved(const UserId& id) override; | 76 void OnUserIdRemoved(const UserId& id) override; |
| 77 | 77 |
| 78 // Set to true the first time a valid factory has been found. | |
| 79 bool got_valid_factory_ = false; | |
| 80 UserIdTracker* id_tracker_; | 78 UserIdTracker* id_tracker_; |
| 81 WindowServer* window_server_; | 79 WindowServer* window_server_; |
| 82 | 80 |
| 83 std::map<UserId, std::unique_ptr<WindowManagerWindowTreeFactory>> factories_; | 81 std::map<UserId, std::unique_ptr<WindowManagerWindowTreeFactory>> factories_; |
| 84 | 82 |
| 85 base::ObserverList<WindowManagerWindowTreeFactorySetObserver> observers_; | 83 base::ObserverList<WindowManagerWindowTreeFactorySetObserver> observers_; |
| 86 | 84 |
| 87 DISALLOW_COPY_AND_ASSIGN(WindowManagerWindowTreeFactorySet); | 85 DISALLOW_COPY_AND_ASSIGN(WindowManagerWindowTreeFactorySet); |
| 88 }; | 86 }; |
| 89 | 87 |
| 90 } // namespace ws | 88 } // namespace ws |
| 91 } // namespace ui | 89 } // namespace ui |
| 92 | 90 |
| 93 #endif // SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ | 91 #endif // SERVICES_UI_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_SET_H_ |
| OLD | NEW |