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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h

Issue 8043024: [cros,webui] Captive portal on login screen proper handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/task.h" 12 #include "base/task.h"
13 #include "chrome/browser/browsing_data_remover.h" 13 #include "chrome/browser/browsing_data_remover.h"
14 #include "chrome/browser/chromeos/login/help_app_launcher.h" 14 #include "chrome/browser/chromeos/login/help_app_launcher.h"
15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
16 #include "content/browser/webui/web_ui.h" 16 #include "content/browser/webui/web_ui.h"
17 17
18 class BrowsingDataRemover; 18 class BrowsingDataRemover;
19 19
20 namespace base { 20 namespace base {
21 class DictionaryValue; 21 class DictionaryValue;
22 class ListValue; 22 class ListValue;
23 } 23 }
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 class NetworkStateInformer;
28
27 // An interface for WebUILoginDisplay to call SigninScreenHandler. 29 // An interface for WebUILoginDisplay to call SigninScreenHandler.
28 class LoginDisplayWebUIHandler { 30 class LoginDisplayWebUIHandler {
29 public: 31 public:
30 virtual void ClearAndEnablePassword() = 0; 32 virtual void ClearAndEnablePassword() = 0;
31 virtual void OnLoginSuccess(const std::string& username) = 0; 33 virtual void OnLoginSuccess(const std::string& username) = 0;
32 virtual void OnUserRemoved(const std::string& username) = 0; 34 virtual void OnUserRemoved(const std::string& username) = 0;
33 virtual void ShowError(int login_attempts, 35 virtual void ShowError(int login_attempts,
34 const std::string& error_text, 36 const std::string& error_text,
35 const std::string& help_link_text, 37 const std::string& help_link_text,
36 HelpAppLauncher::HelpTopic help_topic_id) = 0; 38 HelpAppLauncher::HelpTopic help_topic_id) = 0;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 150
149 // Handles 'launchHelpApp' request. 151 // Handles 'launchHelpApp' request.
150 void HandleLaunchHelpApp(const base::ListValue* args); 152 void HandleLaunchHelpApp(const base::ListValue* args);
151 153
152 // Handle 'createAccount' request. 154 // Handle 'createAccount' request.
153 void HandleCreateAccount(const base::ListValue* args); 155 void HandleCreateAccount(const base::ListValue* args);
154 156
155 // Handle 'loginWebuiReady' request. 157 // Handle 'loginWebuiReady' request.
156 void HandleLoginWebuiReady(const base::ListValue* args); 158 void HandleLoginWebuiReady(const base::ListValue* args);
157 159
160 // Handle 'loginRequestNetworkState' request.
161 void HandleLoginRequestNetworkState(const base::ListValue* args);
162
163 // Handle 'loginAddNetworkStateObserver' request.
164 void HandleLoginAddNetworkStateObserver(const base::ListValue* args);
165
166 // Handle 'loginRemoveNetworkStateObserver' request.
167 void HandleLoginRemoveNetworkStateObserver(const base::ListValue* args);
168
158 // Sends user list to account picker. 169 // Sends user list to account picker.
159 void SendUserList(bool animated); 170 void SendUserList(bool animated);
160 171
161 // Kick off cookie / local storage cleanup. 172 // Kick off cookie / local storage cleanup.
162 void StartClearingCookies(); 173 void StartClearingCookies();
163 174
164 // Kick off DNS cache flushing. 175 // Kick off DNS cache flushing.
165 void StartClearingDnsCache(); 176 void StartClearingDnsCache();
166 void OnDnsCleared(); 177 void OnDnsCleared();
167 178
(...skipping 14 matching lines...) Expand all
182 193
183 // True if cookie jar cleanup is done. 194 // True if cookie jar cleanup is done.
184 bool cookies_cleared_; 195 bool cookies_cleared_;
185 196
186 // True if new user sign in flow is driven by the extension. 197 // True if new user sign in flow is driven by the extension.
187 bool extension_driven_; 198 bool extension_driven_;
188 199
189 // Help application used for help dialogs. 200 // Help application used for help dialogs.
190 scoped_refptr<HelpAppLauncher> help_app_; 201 scoped_refptr<HelpAppLauncher> help_app_;
191 202
203 // Network state infromer used to keep offline message screen up.
204 scoped_ptr<NetworkStateInformer> network_state_informer_;
205
192 // Email to pre-populate with. 206 // Email to pre-populate with.
193 std::string email_; 207 std::string email_;
194 208
195 // Test credentials. 209 // Test credentials.
196 std::string test_user_; 210 std::string test_user_;
197 std::string test_pass_; 211 std::string test_pass_;
198 212
199 BrowsingDataRemover* cookie_remover_; 213 BrowsingDataRemover* cookie_remover_;
200 214
201 ScopedRunnableMethodFactory<SigninScreenHandler> method_factory_; 215 ScopedRunnableMethodFactory<SigninScreenHandler> method_factory_;
202 216
203 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 217 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
204 }; 218 };
205 219
206 } // namespace chromeos 220 } // namespace chromeos
207 221
208 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 222 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698