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

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

Issue 2702393003: [ChromeOS] Expose keyboard remapping to signin screen. (Closed)
Patch Set: Address alemate@ and xiyuan@'s comments. Created 3 years, 10 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 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 669
670 void SigninScreenHandler::SetFocusPODCallbackForTesting( 670 void SigninScreenHandler::SetFocusPODCallbackForTesting(
671 base::Closure callback) { 671 base::Closure callback) {
672 test_focus_pod_callback_ = callback; 672 test_focus_pod_callback_ = callback;
673 } 673 }
674 674
675 void SigninScreenHandler::ZeroOfflineTimeoutForTesting() { 675 void SigninScreenHandler::ZeroOfflineTimeoutForTesting() {
676 zero_offline_timeout_for_test_ = true; 676 zero_offline_timeout_for_test_ = true;
677 } 677 }
678 678
679 bool SigninScreenHandler::GetKeyboardRemappedPrefValue(
680 const std::string& pref_name,
681 int* value) {
682 if (!focused_pod_account_id_ || !focused_pod_account_id_->is_valid() ||
683 !user_manager::known_user::GetIntegerPref(*focused_pod_account_id_,
684 pref_name, value))
685 return false;
686 return true;
xiyuan 2017/02/22 18:50:58 nit: get rid of "if" ? return focused_pod_account
xdai1 2017/02/22 19:26:30 Done.
687 }
688
679 // SigninScreenHandler, private: ----------------------------------------------- 689 // SigninScreenHandler, private: -----------------------------------------------
680 690
681 void SigninScreenHandler::ShowImpl() { 691 void SigninScreenHandler::ShowImpl() {
682 if (!page_is_ready()) { 692 if (!page_is_ready()) {
683 show_on_init_ = true; 693 show_on_init_ = true;
684 return; 694 return;
685 } 695 }
686 696
687 if (!ime_state_.get()) 697 if (!ime_state_.get())
688 ime_state_ = input_method::InputMethodManager::Get()->GetActiveIMEState(); 698 ime_state_ = input_method::InputMethodManager::Get()->GetActiveIMEState();
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 rate.initial_delay_in_ms = auto_repeat_delay; 1647 rate.initial_delay_in_ms = auto_repeat_delay;
1638 rate.repeat_interval_in_ms = auto_repeat_interval; 1648 rate.repeat_interval_in_ms = auto_repeat_interval;
1639 input_method::InputMethodManager::Get() 1649 input_method::InputMethodManager::Get()
1640 ->GetImeKeyboard() 1650 ->GetImeKeyboard()
1641 ->SetAutoRepeatEnabled(true); 1651 ->SetAutoRepeatEnabled(true);
1642 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( 1652 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate(
1643 rate); 1653 rate);
1644 } 1654 }
1645 1655
1646 } // namespace chromeos 1656 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698