Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screen_manager.h
blob24731261aa53525403def048a5d919dc83c0646b
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_
8 #include <map>
9 #include <string>
11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h"
13 #include "base/memory/linked_ptr.h"
14 #include "chrome/browser/chromeos/login/screens/base_screen.h"
16 namespace chromeos {
18 // Class that manages creation and ownership of screens.
19 class ScreenManager {
20 public:
21 ScreenManager();
22 virtual ~ScreenManager();
24 // Getter for screen with lazy initialization.
25 virtual BaseScreen* GetScreen(const std::string& screen_name);
27 // Factory for screen instances.
28 virtual BaseScreen* CreateScreen(const std::string& screen_name) = 0;
30 bool HasScreen(const std::string& screen_name);
32 private:
33 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel);
34 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators);
35 friend class WizardControllerFlowTest;
36 friend class WizardControllerOobeResumeTest;
37 friend class WizardInProcessBrowserTest;
38 friend class WizardControllerBrokenLocalStateTest;
40 // Screens.
41 typedef std::map<std::string, linked_ptr<BaseScreen>> ScreenMap;
42 ScreenMap screens_;
44 DISALLOW_COPY_AND_ASSIGN(ScreenManager);
47 } // namespace chromeos
49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_MANAGER_H_