Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: chrome/browser/chromeos/login/screens/device_disabled_screen_view.h

Issue 2713513009: cros: Break BaseScreenHandler into two classes. (Closed)
Patch Set: Add comments, fix compile Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include "chrome/browser/chromeos/login/oobe_screen.h"
9 10
10 namespace chromeos { 11 namespace chromeos {
11 12
12 // Interface between the device disabled screen and its representation. 13 // Interface between the device disabled screen and its representation.
13 class DeviceDisabledScreenView { 14 class DeviceDisabledScreenView {
14 public: 15 public:
15 // Allows the representation to access information about the screen. 16 // Allows the representation to access information about the screen.
16 class Delegate { 17 class Delegate {
17 public: 18 public:
18 virtual ~Delegate() {} 19 virtual ~Delegate() {}
19 20
20 // Called when the view is being destroyed. Note that if the Delegate is 21 // Called when the view is being destroyed. Note that if the Delegate is
21 // destroyed first, it must call SetDelegate(nullptr). 22 // destroyed first, it must call SetDelegate(nullptr).
22 virtual void OnViewDestroyed(DeviceDisabledScreenView* view) = 0; 23 virtual void OnViewDestroyed(DeviceDisabledScreenView* view) = 0;
23 24
24 // Returns the domain that owns the device. 25 // Returns the domain that owns the device.
25 virtual const std::string& GetEnrollmentDomain() const = 0; 26 virtual const std::string& GetEnrollmentDomain() const = 0;
26 27
27 // Returns the message that should be shown to the user. 28 // Returns the message that should be shown to the user.
28 virtual const std::string& GetMessage() const = 0; 29 virtual const std::string& GetMessage() const = 0;
29 }; 30 };
30 31
32 constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_DEVICE_DISABLED;
33
31 virtual ~DeviceDisabledScreenView() {} 34 virtual ~DeviceDisabledScreenView() {}
32 35
33 virtual void Show() = 0; 36 virtual void Show() = 0;
34 virtual void Hide() = 0; 37 virtual void Hide() = 0;
35 virtual void SetDelegate(Delegate* delegate) = 0; 38 virtual void SetDelegate(Delegate* delegate) = 0;
36 virtual void UpdateMessage(const std::string& message) = 0; 39 virtual void UpdateMessage(const std::string& message) = 0;
37 }; 40 };
38 41
39 } // namespace chromeos 42 } // namespace chromeos
40 43
41 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_ 44 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_DEVICE_DISABLED_SCREEN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698