| OLD | NEW |
| 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/memory/weak_ptr.h" |
| 12 #include "base/task.h" | 13 #include "base/task.h" |
| 13 #include "chrome/browser/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data_remover.h" |
| 14 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 15 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 16 #include "content/browser/webui/web_ui.h" | 17 #include "content/browser/webui/web_ui.h" |
| 17 | 18 |
| 18 class BrowsingDataRemover; | 19 class BrowsingDataRemover; |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class DictionaryValue; | 22 class DictionaryValue; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // Handle 'loginRemoveNetworkStateObserver' request. | 167 // Handle 'loginRemoveNetworkStateObserver' request. |
| 167 void HandleLoginRemoveNetworkStateObserver(const base::ListValue* args); | 168 void HandleLoginRemoveNetworkStateObserver(const base::ListValue* args); |
| 168 | 169 |
| 169 // Sends user list to account picker. | 170 // Sends user list to account picker. |
| 170 void SendUserList(bool animated); | 171 void SendUserList(bool animated); |
| 171 | 172 |
| 172 // Kick off cookie / local storage cleanup. | 173 // Kick off cookie / local storage cleanup. |
| 173 void StartClearingCookies(); | 174 void StartClearingCookies(); |
| 174 | 175 |
| 175 // Kick off DNS cache flushing. | 176 // Kick off DNS cache flushing. |
| 177 void ClearDnsCache(const base::Closure& callback, IOThread* io_thread); |
| 176 void StartClearingDnsCache(); | 178 void StartClearingDnsCache(); |
| 177 void OnDnsCleared(); | 179 void OnDnsCleared(); |
| 178 | 180 |
| 179 // A delegate that glues this handler with backend LoginDisplay. | 181 // A delegate that glues this handler with backend LoginDisplay. |
| 180 SigninScreenHandlerDelegate* delegate_; | 182 SigninScreenHandlerDelegate* delegate_; |
| 181 | 183 |
| 182 // Whether screen should be shown right after initialization. | 184 // Whether screen should be shown right after initialization. |
| 183 bool show_on_init_; | 185 bool show_on_init_; |
| 184 | 186 |
| 185 // Keeps whether screen should be shown for OOBE. | 187 // Keeps whether screen should be shown for OOBE. |
| 186 bool oobe_ui_; | 188 bool oobe_ui_; |
| 187 | 189 |
| 188 // True if dns cache cleanup is done. | 190 // True if dns cache cleanup is done. |
| 189 bool dns_cleared_; | 191 bool dns_cleared_; |
| 190 | 192 |
| 191 // True if DNS cache task is already running. | 193 // True if DNS cache task is already running. |
| 192 bool dns_clear_task_running_; | 194 bool dns_clear_task_running_; |
| 193 | 195 |
| 194 // True if cookie jar cleanup is done. | 196 // True if cookie jar cleanup is done. |
| 195 bool cookies_cleared_; | 197 bool cookies_cleared_; |
| 196 | 198 |
| 197 // True if new user sign in flow is driven by the extension. | 199 // True if new user sign in flow is driven by the extension. |
| 198 bool extension_driven_; | 200 bool extension_driven_; |
| 199 | 201 |
| 200 // Help application used for help dialogs. | 202 // Help application used for help dialogs. |
| 201 scoped_refptr<HelpAppLauncher> help_app_; | 203 scoped_refptr<HelpAppLauncher> help_app_; |
| 202 | 204 |
| 203 // Network state infromer used to keep offline message screen up. | 205 // Network state informer used to keep offline message screen up. |
| 204 scoped_ptr<NetworkStateInformer> network_state_informer_; | 206 scoped_ptr<NetworkStateInformer> network_state_informer_; |
| 205 | 207 |
| 206 // Email to pre-populate with. | 208 // Email to pre-populate with. |
| 207 std::string email_; | 209 std::string email_; |
| 208 | 210 |
| 209 // Test credentials. | 211 // Test credentials. |
| 210 std::string test_user_; | 212 std::string test_user_; |
| 211 std::string test_pass_; | 213 std::string test_pass_; |
| 212 | 214 |
| 213 BrowsingDataRemover* cookie_remover_; | 215 BrowsingDataRemover* cookie_remover_; |
| 214 | 216 |
| 215 ScopedRunnableMethodFactory<SigninScreenHandler> method_factory_; | 217 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
| 216 | 218 |
| 217 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 219 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
| 218 }; | 220 }; |
| 219 | 221 |
| 220 } // namespace chromeos | 222 } // namespace chromeos |
| 221 | 223 |
| 222 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 224 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| OLD | NEW |