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

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

Issue 10408072: Rewrite of the EnrollEnterpriseDevice PyAuto automation hook for WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits. Created 8 years, 7 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 | Annotate | Revision Log
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_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 }; 30 };
31 31
32 // Used in PyAuto testing. 32 // Used in PyAuto testing.
33 class Observer { 33 class Observer {
34 public: 34 public:
35 virtual ~Observer() {} 35 virtual ~Observer() {}
36 36
37 // Notifies observers of a change in enrollment state. 37 // Notifies observers of a change in enrollment state.
38 virtual void OnEnrollmentComplete( 38 virtual void OnEnrollmentComplete(
39 EnterpriseEnrollmentScreenActor* enrollment_screen, 39 EnterpriseEnrollmentScreenActor* enrollment_screen,
40 bool succeeded) = 0; 40 bool succeeded,
41 const std::string& error_string) = 0;
41 }; 42 };
42 43
43 EnterpriseEnrollmentScreenActor(); 44 EnterpriseEnrollmentScreenActor();
44 45
45 virtual ~EnterpriseEnrollmentScreenActor(); 46 virtual ~EnterpriseEnrollmentScreenActor();
46 47
47 void AddObserver(Observer* obs); 48 void AddObserver(Observer* obs);
48 49
49 void RemoveObserver(Observer* obs); 50 void RemoveObserver(Observer* obs);
50 51
(...skipping 15 matching lines...) Expand all
66 // Show an authentication error. 67 // Show an authentication error.
67 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0; 68 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0;
68 virtual void ShowAccountError() = 0; 69 virtual void ShowAccountError() = 0;
69 virtual void ShowSerialNumberError() = 0; 70 virtual void ShowSerialNumberError() = 0;
70 virtual void ShowEnrollmentModeError() = 0; 71 virtual void ShowEnrollmentModeError() = 0;
71 virtual void ShowFatalAuthError() = 0; 72 virtual void ShowFatalAuthError() = 0;
72 virtual void ShowFatalEnrollmentError() = 0; 73 virtual void ShowFatalEnrollmentError() = 0;
73 virtual void ShowAutoEnrollmentError() = 0; 74 virtual void ShowAutoEnrollmentError() = 0;
74 virtual void ShowNetworkEnrollmentError() = 0; 75 virtual void ShowNetworkEnrollmentError() = 0;
75 76
76 // Used for testing only.
77 virtual void SubmitTestCredentials(const std::string& email,
78 const std::string& password) = 0;
79
80 protected: 77 protected:
81 void NotifyObservers(bool succeeded); 78 void NotifyObservers(bool succeeded,
79 const std::string& error_string);
82 80
83 private: 81 private:
84 // Observers. 82 // Observers.
85 ObserverList<Observer> observer_list_; 83 ObserverList<Observer> observer_list_;
86 }; 84 };
87 85
88 } // namespace chromeos 86 } // namespace chromeos
89 87
90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN _ACTOR_H_ 88 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN _ACTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698