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_SCREENS_ENABLE_DEBUGGING_SCREEN_VIEW_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENABLE_DEBUGGING_SCREEN_VIEW_H_ | |
7 | |
8 #include <string> | |
9 #include "chrome/browser/chromeos/login/oobe_screen.h" | |
10 | |
11 namespace chromeos { | |
12 | |
13 // Interface between enable debugging screen and its representation. | |
14 // Note, do not forget to call OnViewDestroyed in the dtor. | |
15 class EnableDebuggingScreenView { | |
16 public: | |
17 // Allows us to get info from reset screen that we need. | |
18 class Delegate { | |
19 public: | |
20 virtual ~Delegate() {} | |
21 | |
22 // Called when screen is exited. | |
23 virtual void OnExit(bool success) = 0; | |
24 | |
25 // This method is called, when view is being destroyed. Note, if Delegate | |
26 // is destroyed earlier then it has to call SetDelegate(nullptr). | |
27 virtual void OnViewDestroyed(EnableDebuggingScreenView* view) = 0; | |
28 }; | |
29 | |
30 constexpr static OobeScreen kScreenId = | |
31 OobeScreen::SCREEN_OOBE_ENABLE_DEBUGGING; | |
32 | |
33 virtual ~EnableDebuggingScreenView() {} | |
34 | |
35 virtual void Show() = 0; | |
36 virtual void Hide() = 0; | |
37 virtual void SetDelegate(Delegate* delegate) = 0; | |
38 }; | |
39 | |
40 } // namespace chromeos | |
41 | |
42 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENABLE_DEBUGGING_SCREEN_VIEW_H_ | |
OLD | NEW |