1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_USER_ADDING_SCREEN_INPUT_METHODS_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_USER_ADDING_SCREEN_INPUT_METHODS_CONTROLLER_H_
8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
10 #include "ui/base/ime/chromeos/input_method_manager.h"
12 namespace user_manager
{
18 // Ensure a set of "Login keyboard layouts" is used at UserAddingScreen.
19 class UserAddingScreenInputMethodsController
20 : public UserAddingScreen::Observer
{
22 explicit UserAddingScreenInputMethodsController(UserAddingScreen
* screen
);
23 ~UserAddingScreenInputMethodsController() override
;
25 // UserAddingScreen::Observer implementation:
26 void OnUserAddingStarted() override
;
27 void OnUserAddingFinished() override
;
30 UserAddingScreen
* screen_
;
32 scoped_refptr
<input_method::InputMethodManager::State
> saved_ime_state_
;
33 user_manager::User
* active_user_on_show_
;
35 DISALLOW_COPY_AND_ASSIGN(UserAddingScreenInputMethodsController
);
38 } // namespace chromeos
40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_USER_ADDING_SCREEN_INPUT_METHODS_CONTROLLER_H_