OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/linked_ptr.h" |
| 13 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" |
| 14 |
| 15 namespace chromeos { |
| 16 |
| 17 // Class that manages creation and ownership of screens. |
| 18 class ScreenManager { |
| 19 public: |
| 20 ScreenManager(); |
| 21 virtual ~ScreenManager(); |
| 22 |
| 23 // Getter for screen with lazy initialization. |
| 24 WizardScreen* GetScreen(const std::string& screen_name); |
| 25 |
| 26 // Factory for screen instances. |
| 27 virtual WizardScreen* CreateScreen(const std::string& screen_name) = 0; |
| 28 |
| 29 bool HasScreen(const std::string& screen_name); |
| 30 |
| 31 private: |
| 32 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); |
| 33 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); |
| 34 friend class WizardControllerFlowTest; |
| 35 friend class WizardControllerOobeResumeTest; |
| 36 friend class WizardInProcessBrowserTest; |
| 37 friend class WizardControllerBrokenLocalStateTest; |
| 38 |
| 39 // Screens. |
| 40 typedef std::map<std::string, linked_ptr<WizardScreen> > ScreenMap; |
| 41 ScreenMap screens_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(ScreenManager); |
| 44 }; |
| 45 |
| 46 } // namespace chromeos |
| 47 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_ |
OLD | NEW |