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

Side by Side Diff: chrome/browser/chromeos/login/error_screen_actor.h

Issue 12207077: Refactored error screen logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 7 years, 10 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_ERROR_SCREEN_ACTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ERROR_SCREEN_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ERROR_SCREEN_ACTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ERROR_SCREEN_ACTOR_H_
7 7
8 #include "chrome/browser/chromeos/cros/network_constants.h" 8 #include "chrome/browser/chromeos/cros/network_constants.h"
9 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 9 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
10 10
11 namespace base { 11 namespace base {
12 class DictionaryValue; 12 class DictionaryValue;
13 } 13 }
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 class ErrorScreenActor { 17 class ErrorScreenActor {
18 public: 18 public:
19 enum State { 19 enum State {
20 STATE_UNKNOWN = 0, 20 STATE_UNKNOWN = 0,
21 STATE_PROXY_ERROR, 21 STATE_PROXY_ERROR,
22 STATE_CAPTIVE_PORTAL_ERROR, 22 STATE_CAPTIVE_PORTAL_ERROR,
23 STATE_OFFLINE_ERROR, 23 STATE_OFFLINE_ERROR,
24 STATE_TIMEOUT_ERROR
24 }; 25 };
25 26
26 // Possible error reasons. 27 // Possible error reasons.
27 static const char kErrorReasonProxyAuthCancelled[]; 28 static const char kErrorReasonProxyAuthCancelled[];
28 static const char kErrorReasonProxyConnectionFailed[]; 29 static const char kErrorReasonProxyConnectionFailed[];
29 static const char kErrorReasonProxyConfigChanged[]; 30 static const char kErrorReasonProxyConfigChanged[];
30 static const char kErrorReasonLoadingTimeout[]; 31 static const char kErrorReasonLoadingTimeout[];
31 static const char kErrorReasonPortalDetected[]; 32 static const char kErrorReasonPortalDetected[];
32 // Reason for a case when network manager notifies about network 33 // Reason for a case when network manager notifies about network
33 // change. 34 // change.
(...skipping 23 matching lines...) Expand all
57 58
58 // Shows captive portal dialog. 59 // Shows captive portal dialog.
59 virtual void ShowCaptivePortal() = 0; 60 virtual void ShowCaptivePortal() = 0;
60 61
61 // Hides captive portal dialog. 62 // Hides captive portal dialog.
62 virtual void HideCaptivePortal() = 0; 63 virtual void HideCaptivePortal() = 0;
63 64
64 // Each of the following methods shows corresponding error message. 65 // Each of the following methods shows corresponding error message.
65 virtual void ShowProxyError() = 0; 66 virtual void ShowProxyError() = 0;
66 virtual void ShowCaptivePortalError(const std::string& network) = 0; 67 virtual void ShowCaptivePortalError(const std::string& network) = 0;
68 virtual void ShowTimeoutError() = 0;
67 virtual void ShowOfflineError() = 0; 69 virtual void ShowOfflineError() = 0;
68 virtual void AllowGuestSignin(bool allowed) = 0; 70 virtual void AllowGuestSignin(bool allowed) = 0;
69 virtual void AllowOfflineLogin(bool allowed) = 0; 71 virtual void AllowOfflineLogin(bool allowed) = 0;
70 72
71 protected: 73 protected:
72 State state_; 74 State state_;
73 OobeUI::Screen parent_screen_; 75 OobeUI::Screen parent_screen_;
74 }; 76 };
75 77
76 } // namespace chromeos 78 } // namespace chromeos
77 79
78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ERROR_SCREEN_ACTOR_H_ 80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ERROR_SCREEN_ACTOR_H_
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/resources/chromeos/login/screen_error_message.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698