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

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

Issue 484353005: ChromeOS: "Add New User" screen should enable all hardware keyboards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
index 2cc7bd5b0ed9e9a82857a9dd142750df5799e8be..bcd01ece602a0e49289b12d3836d9005ba09d4e0 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
@@ -28,6 +28,7 @@
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h"
#include "chromeos/ime/ime_keyboard.h"
+#include "chromeos/ime/input_method_manager.h"
#include "chromeos/network/portal_detector/network_portal_detector.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/notification_observer.h"
@@ -213,7 +214,8 @@ class SigninScreenHandler
public ScreenlockBridge::LockHandler,
public NetworkStateInformer::NetworkStateInformerObserver,
public input_method::ImeKeyboard::Observer,
- public TouchViewControllerDelegate::Observer {
+ public TouchViewControllerDelegate::Observer,
+ public OobeUI::Observer {
public:
SigninScreenHandler(
const scoped_refptr<NetworkStateInformer>& network_state_informer,
@@ -246,6 +248,15 @@ class SigninScreenHandler
kiosk_enable_flow_aborted_callback_for_test_ = callback;
}
+ // OobeUI::Observer implemetation.
+ virtual void OnCurrentScreenChanged(OobeUI::Screen current_screen,
+ OobeUI::Screen new_screen) OVERRIDE;
+
+ // Returns Least Used User login Input method.
dzhioev (left Google) 2014/09/23 14:32:18 Fix capital letters.
Alexander Alekseev 2014/09/23 14:39:37 Done.
+ std::string GetUserLRUInputMethod(const std::string& username) const;
+
+ void SetFocusPODCallbackForTesting(base::Closure callback);
+
private:
enum UIState {
UI_STATE_UNKNOWN = 0,
@@ -422,8 +433,10 @@ class SigninScreenHandler
bool ShouldLoadGaia() const;
- // Update current input method (namely keyboard layout) to LRU by this user.
- void SetUserInputMethod(const std::string& username);
+ // Update current input method (namely keyboard layout) in the given IME state
+ // to LRU by this user.
+ void SetUserInputMethod(const std::string& username,
+ input_method::InputMethodManager::State* ime_state);
// Invoked when auto enrollment check progresses to decide whether to
// continue kiosk enable flow. Kiosk enable flow is resumed when
@@ -439,6 +452,9 @@ class SigninScreenHandler
// input_method::ImeKeyboard::Observer implementation:
virtual void OnCapsLockChanged(bool enabled) OVERRIDE;
+ // Returns OobeUI object of NULL.
+ OobeUI* GetOobeUI() const;
+
// Current UI state of the signin screen.
UIState ui_state_;
@@ -501,6 +517,12 @@ class SigninScreenHandler
// Whether consumer management enrollment is in progress.
bool is_enrolling_consumer_management_;
+ // Input Method Engine state used at signin screen.
+ scoped_refptr<input_method::InputMethodManager::State> ime_state_;
+
+ // This callback captures "focusPod finished" event for tests.
+ base::Closure test_focus_pod_callback_;
+
base::WeakPtrFactory<SigninScreenHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);

Powered by Google App Engine
This is Rietveld 408576698