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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enrollment_screen_view.h

Issue 2959853003: Add UI components for license type selection in ChromeOS login UI. (Closed)
Patch Set: Remove unused flex import Created 3 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/values.h"
10 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper. h" 11 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper. h"
11 #include "chrome/browser/chromeos/login/oobe_screen.h" 12 #include "chrome/browser/chromeos/login/oobe_screen.h"
12 13
13 class GoogleServiceAuthError; 14 class GoogleServiceAuthError;
14 15
15 namespace policy { 16 namespace policy {
16 struct EnrollmentConfig; 17 struct EnrollmentConfig;
17 class EnrollmentStatus; 18 class EnrollmentStatus;
18 } 19 }
19 20
20 namespace chromeos { 21 namespace chromeos {
21 22
22 // Interface class for the enterprise enrollment screen view. 23 // Interface class for the enterprise enrollment screen view.
23 class EnrollmentScreenView { 24 class EnrollmentScreenView {
24 public: 25 public:
25 // This defines the interface for controllers which will be called back when 26 // This defines the interface for controllers which will be called back when
26 // something happens on the UI. 27 // something happens on the UI.
27 class Controller { 28 class Controller {
28 public: 29 public:
29 virtual ~Controller() {} 30 virtual ~Controller() {}
30 31
31 virtual void OnLoginDone(const std::string& user, 32 virtual void OnLoginDone(const std::string& user,
32 const std::string& auth_code) = 0; 33 const std::string& auth_code) = 0;
34 virtual void OnLicenseTypeSelected(const std::string& license_type) = 0;
33 virtual void OnRetry() = 0; 35 virtual void OnRetry() = 0;
34 virtual void OnCancel() = 0; 36 virtual void OnCancel() = 0;
35 virtual void OnConfirmationClosed() = 0; 37 virtual void OnConfirmationClosed() = 0;
36 virtual void OnAdJoined(const std::string& realm) = 0; 38 virtual void OnAdJoined(const std::string& realm) = 0;
37 virtual void OnDeviceAttributeProvided(const std::string& asset_id, 39 virtual void OnDeviceAttributeProvided(const std::string& asset_id,
38 const std::string& location) = 0; 40 const std::string& location) = 0;
39 }; 41 };
40 42
41 constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_ENROLLMENT; 43 constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_ENROLLMENT;
42 44
43 virtual ~EnrollmentScreenView() {} 45 virtual ~EnrollmentScreenView() {}
44 46
45 // Initializes the view with parameters. 47 // Initializes the view with parameters.
46 virtual void SetParameters(Controller* controller, 48 virtual void SetParameters(Controller* controller,
47 const policy::EnrollmentConfig& config) = 0; 49 const policy::EnrollmentConfig& config) = 0;
48 50
49 // Shows the contents of the screen. 51 // Shows the contents of the screen.
50 virtual void Show() = 0; 52 virtual void Show() = 0;
51 53
52 // Hides the contents of the screen. 54 // Hides the contents of the screen.
53 virtual void Hide() = 0; 55 virtual void Hide() = 0;
54 56
55 // Shows the signin screen. 57 // Shows the signin screen.
56 virtual void ShowSigninScreen() = 0; 58 virtual void ShowSigninScreen() = 0;
57 59
60 // Shows the license type selection screen.
61 virtual void ShowLicenseTypeSelectionScreen(
62 const base::DictionaryValue& license_types) = 0;
63
58 // Shows the Active Directory domain joining screen. 64 // Shows the Active Directory domain joining screen.
59 virtual void ShowAdJoin() = 0; 65 virtual void ShowAdJoin() = 0;
60 66
61 // Shows the device attribute prompt screen. 67 // Shows the device attribute prompt screen.
62 virtual void ShowAttributePromptScreen(const std::string& asset_id, 68 virtual void ShowAttributePromptScreen(const std::string& asset_id,
63 const std::string& location) = 0; 69 const std::string& location) = 0;
64 70
65 // Shows a success string for attestation-based enrollment. 71 // Shows a success string for attestation-based enrollment.
66 virtual void ShowAttestationBasedEnrollmentSuccessScreen( 72 virtual void ShowAttestationBasedEnrollmentSuccessScreen(
67 const std::string& enterprise_domain) = 0; 73 const std::string& enterprise_domain) = 0;
68 74
69 // Shows the spinner screen for enrollment. 75 // Shows the spinner screen for enrollment.
70 virtual void ShowEnrollmentSpinnerScreen() = 0; 76 virtual void ShowEnrollmentSpinnerScreen() = 0;
71 77
72 // Show an authentication error. 78 // Show an authentication error.
73 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0; 79 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0;
74 80
75 // Show non-authentication error. 81 // Show non-authentication error.
76 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0; 82 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0;
77 83
78 // Update the UI to report the |status| of the enrollment procedure. 84 // Update the UI to report the |status| of the enrollment procedure.
79 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; 85 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0;
80 }; 86 };
81 87
82 } // namespace chromeos 88 } // namespace chromeos
83 89
84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698