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

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: nits2 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 // Handles 'launchHelpApp' request. 144 // Handles 'launchHelpApp' request.
143 void HandleLaunchHelpApp(const base::ListValue* args); 145 void HandleLaunchHelpApp(const base::ListValue* args);
144 146
145 // Handle 'createAccount' request. 147 // Handle 'createAccount' request.
146 void HandleCreateAccount(const base::ListValue* args); 148 void HandleCreateAccount(const base::ListValue* args);
147 149
148 // Handle 'loginWebuiReady' request. 150 // Handle 'loginWebuiReady' request.
149 void HandleLoginWebuiReady(const base::ListValue* args); 151 void HandleLoginWebuiReady(const base::ListValue* args);
150 152
153 // Handle 'loginRequestNetworkState' request.
154 void HandleLoginRequestNetworkState(const base::ListValue* args);
155
156 // Handle 'loginAddNetworkStateObserver' request.
157 void HandleLoginAddNetworkStateObserver(const base::ListValue* args);
158
159 // Handle 'loginRemoveNetworkStateObserver' request.
160 void HandleLoginRemoveNetworkStateObserver(const base::ListValue* args);
161
151 // Sends user list to account picker. 162 // Sends user list to account picker.
152 void SendUserList(bool animated); 163 void SendUserList(bool animated);
153 164
154 // Kick off cookie / local storage cleanup. 165 // Kick off cookie / local storage cleanup.
155 void StartClearingCookies(); 166 void StartClearingCookies();
156 167
157 // Kick off DNS cache flushing. 168 // Kick off DNS cache flushing.
158 void StartClearingDnsCache(); 169 void StartClearingDnsCache();
159 void OnDnsCleared(); 170 void OnDnsCleared();
160 171
(...skipping 14 matching lines...) Expand all
175 186
176 // True if cookie jar cleanup is done. 187 // True if cookie jar cleanup is done.
177 bool cookies_cleared_; 188 bool cookies_cleared_;
178 189
179 // True if new user sign in flow is driven by the extension. 190 // True if new user sign in flow is driven by the extension.
180 bool extension_driven_; 191 bool extension_driven_;
181 192
182 // Help application used for help dialogs. 193 // Help application used for help dialogs.
183 scoped_refptr<HelpAppLauncher> help_app_; 194 scoped_refptr<HelpAppLauncher> help_app_;
184 195
196 // Network state infromer used to keep offline message screen up.
197 scoped_ptr<NetworkStateInformer> network_state_informer_;
198
185 // Email to pre-populate with. 199 // Email to pre-populate with.
186 std::string email_; 200 std::string email_;
187 201
188 // Test credentials. 202 // Test credentials.
189 std::string test_user_; 203 std::string test_user_;
190 std::string test_pass_; 204 std::string test_pass_;
191 205
192 BrowsingDataRemover* cookie_remover_; 206 BrowsingDataRemover* cookie_remover_;
193 207
194 ScopedRunnableMethodFactory<SigninScreenHandler> method_factory_; 208 ScopedRunnableMethodFactory<SigninScreenHandler> method_factory_;
195 209
196 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 210 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
197 }; 211 };
198 212
199 } // namespace chromeos 213 } // namespace chromeos
200 214
201 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 215 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698