OLD | NEW |
| (Empty) |
1 // Copyright 2014 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_DEVICE_DISABLED_SCREEN_VIEW_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_ | |
7 | |
8 #include <string> | |
9 #include "chrome/browser/chromeos/login/oobe_screen.h" | |
10 | |
11 namespace chromeos { | |
12 | |
13 // Interface between the device disabled screen and its representation. | |
14 class DeviceDisabledScreenView { | |
15 public: | |
16 // Allows the representation to access information about the screen. | |
17 class Delegate { | |
18 public: | |
19 virtual ~Delegate() {} | |
20 | |
21 // Called when the view is being destroyed. Note that if the Delegate is | |
22 // destroyed first, it must call SetDelegate(nullptr). | |
23 virtual void OnViewDestroyed(DeviceDisabledScreenView* view) = 0; | |
24 | |
25 // Returns the domain that owns the device. | |
26 virtual const std::string& GetEnrollmentDomain() const = 0; | |
27 | |
28 // Returns the message that should be shown to the user. | |
29 virtual const std::string& GetMessage() const = 0; | |
30 }; | |
31 | |
32 constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_DEVICE_DISABLED; | |
33 | |
34 virtual ~DeviceDisabledScreenView() {} | |
35 | |
36 virtual void Show() = 0; | |
37 virtual void Hide() = 0; | |
38 virtual void SetDelegate(Delegate* delegate) = 0; | |
39 virtual void UpdateMessage(const std::string& message) = 0; | |
40 }; | |
41 | |
42 } // namespace chromeos | |
43 | |
44 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_ | |
OLD | NEW |