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

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

Issue 2015413002: Enable the PIN keyboard on the lockscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Address comments Created 4 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/containers/hash_tables.h" 15 #include "base/containers/hash_tables.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "chrome/browser/chromeos/login/screens/network_error_model.h" 19 #include "chrome/browser/chromeos/login/screens/network_error_model.h"
20 #include "chrome/browser/chromeos/login/signin_specifics.h" 20 #include "chrome/browser/chromeos/login/signin_specifics.h"
21 #include "chrome/browser/chromeos/login/ui/login_display.h" 21 #include "chrome/browser/chromeos/login/ui/login_display.h"
22 #include "chrome/browser/chromeos/settings/cros_settings.h" 22 #include "chrome/browser/chromeos/settings/cros_settings.h"
23 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 23 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
24 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 24 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
25 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 25 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
26 #include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h" 26 #include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h"
27 #include "chromeos/dbus/power_manager_client.h"
27 #include "chromeos/network/portal_detector/network_portal_detector.h" 28 #include "chromeos/network/portal_detector/network_portal_detector.h"
28 #include "components/proximity_auth/screenlock_bridge.h" 29 #include "components/proximity_auth/screenlock_bridge.h"
29 #include "components/user_manager/user_manager.h" 30 #include "components/user_manager/user_manager.h"
30 #include "content/public/browser/notification_observer.h" 31 #include "content/public/browser/notification_observer.h"
31 #include "content/public/browser/notification_registrar.h" 32 #include "content/public/browser/notification_registrar.h"
32 #include "content/public/browser/web_ui.h" 33 #include "content/public/browser/web_ui.h"
33 #include "net/base/net_errors.h" 34 #include "net/base/net_errors.h"
34 #include "ui/base/ime/chromeos/ime_keyboard.h" 35 #include "ui/base/ime/chromeos/ime_keyboard.h"
35 #include "ui/base/ime/chromeos/input_method_manager.h" 36 #include "ui/base/ime/chromeos/input_method_manager.h"
36 #include "ui/events/event_handler.h" 37 #include "ui/events/event_handler.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 virtual ~SigninScreenHandlerDelegate() {} 198 virtual ~SigninScreenHandlerDelegate() {}
198 }; 199 };
199 200
200 // A class that handles the WebUI hooks in sign-in screen in OobeUI and 201 // A class that handles the WebUI hooks in sign-in screen in OobeUI and
201 // LoginDisplay. 202 // LoginDisplay.
202 class SigninScreenHandler 203 class SigninScreenHandler
203 : public BaseScreenHandler, 204 : public BaseScreenHandler,
204 public LoginDisplayWebUIHandler, 205 public LoginDisplayWebUIHandler,
205 public content::NotificationObserver, 206 public content::NotificationObserver,
206 public NetworkStateInformer::NetworkStateInformerObserver, 207 public NetworkStateInformer::NetworkStateInformerObserver,
208 public PowerManagerClient::Observer,
207 public input_method::ImeKeyboard::Observer, 209 public input_method::ImeKeyboard::Observer,
208 public TouchViewControllerDelegate::Observer, 210 public TouchViewControllerDelegate::Observer,
209 public OobeUI::Observer { 211 public OobeUI::Observer {
210 public: 212 public:
211 SigninScreenHandler( 213 SigninScreenHandler(
212 const scoped_refptr<NetworkStateInformer>& network_state_informer, 214 const scoped_refptr<NetworkStateInformer>& network_state_informer,
213 NetworkErrorModel* network_error_model, 215 NetworkErrorModel* network_error_model,
214 CoreOobeActor* core_oobe_actor, 216 CoreOobeActor* core_oobe_actor,
215 GaiaScreenHandler* gaia_screen_handler); 217 GaiaScreenHandler* gaia_screen_handler);
216 ~SigninScreenHandler() override; 218 ~SigninScreenHandler() override;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 const std::string& password) override; 307 const std::string& password) override;
306 void ShowWhitelistCheckFailedError() override; 308 void ShowWhitelistCheckFailedError() override;
307 void ShowUnrecoverableCrypthomeErrorDialog() override; 309 void ShowUnrecoverableCrypthomeErrorDialog() override;
308 void LoadUsers(const base::ListValue& users_list, bool show_guest) override; 310 void LoadUsers(const base::ListValue& users_list, bool show_guest) override;
309 311
310 // content::NotificationObserver implementation: 312 // content::NotificationObserver implementation:
311 void Observe(int type, 313 void Observe(int type,
312 const content::NotificationSource& source, 314 const content::NotificationSource& source,
313 const content::NotificationDetails& details) override; 315 const content::NotificationDetails& details) override;
314 316
317 // PowerManagerClient::Observer implementation:
318 void SuspendDone(const base::TimeDelta& sleep_duration) override;
319
315 // TouchViewControllerDelegate::Observer implementation: 320 // TouchViewControllerDelegate::Observer implementation:
316 void OnMaximizeModeStarted() override; 321 void OnMaximizeModeStarted() override;
317 void OnMaximizeModeEnded() override; 322 void OnMaximizeModeEnded() override;
318 323
319 void UpdateAddButtonStatus(); 324 void UpdateAddButtonStatus();
320 325
321 // Restore input focus to current user pod. 326 // Restore input focus to current user pod.
322 void RefocusCurrentPod(); 327 void RefocusCurrentPod();
323 328
329 // Hides the PIN keyboard if it is no longer available.
330 void HidePinKeyboardIfNeeded(const AccountId& account_id);
331
324 // WebUI message handlers. 332 // WebUI message handlers.
325 void HandleGetUsers(); 333 void HandleGetUsers();
326 void HandleAuthenticateUser(const AccountId& account_id, 334 void HandleAuthenticateUser(const AccountId& account_id,
327 const std::string& password); 335 const std::string& password);
328 void HandleAuthenticateUserWithPin(const AccountId& account_id,
329 const std::string& password);
330 void HandleAttemptUnlock(const std::string& username); 336 void HandleAttemptUnlock(const std::string& username);
331 void HandleLaunchIncognito(); 337 void HandleLaunchIncognito();
332 void HandleLaunchPublicSession(const AccountId& account_id, 338 void HandleLaunchPublicSession(const AccountId& account_id,
333 const std::string& locale, 339 const std::string& locale,
334 const std::string& input_method); 340 const std::string& input_method);
335 void HandleOfflineLogin(const base::ListValue* args); 341 void HandleOfflineLogin(const base::ListValue* args);
336 void HandleShutdownSystem(); 342 void HandleShutdownSystem();
337 void HandleLoadWallpaper(const AccountId& account_id); 343 void HandleLoadWallpaper(const AccountId& account_id);
338 void HandleRebootSystem(); 344 void HandleRebootSystem();
339 void HandleRemoveUser(const AccountId& account_id); 345 void HandleRemoveUser(const AccountId& account_id);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 std::unique_ptr<LoginFeedback> login_feedback_; 494 std::unique_ptr<LoginFeedback> login_feedback_;
489 495
490 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; 496 base::WeakPtrFactory<SigninScreenHandler> weak_factory_;
491 497
492 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 498 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
493 }; 499 };
494 500
495 } // namespace chromeos 501 } // namespace chromeos
496 502
497 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 503 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698