OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/input_method/input_method_util.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 InputMethodDescriptor InputMethodUtil::GetFallbackInputMethodDescriptor() { | 631 InputMethodDescriptor InputMethodUtil::GetFallbackInputMethodDescriptor() { |
632 std::vector<std::string> layouts; | 632 std::vector<std::string> layouts; |
633 layouts.push_back("us"); | 633 layouts.push_back("us"); |
634 std::vector<std::string> languages; | 634 std::vector<std::string> languages; |
635 languages.push_back("en-US"); | 635 languages.push_back("en-US"); |
636 return InputMethodDescriptor("xkb:us::eng", | 636 return InputMethodDescriptor("xkb:us::eng", |
637 "", | 637 "", |
638 layouts, | 638 layouts, |
639 languages, | 639 languages, |
| 640 true, // login keyboard. |
640 GURL()); // options page, not available. | 641 GURL()); // options page, not available. |
641 } | 642 } |
642 | 643 |
643 void InputMethodUtil::ReloadInternalMaps() { | 644 void InputMethodUtil::ReloadInternalMaps() { |
644 if (supported_input_methods_->size() <= 1) { | 645 if (supported_input_methods_->size() <= 1) { |
645 DVLOG(1) << "GetSupportedInputMethods returned a fallback ID"; | 646 DVLOG(1) << "GetSupportedInputMethods returned a fallback ID"; |
646 // TODO(yusukes): Handle this error in nicer way. | 647 // TODO(yusukes): Handle this error in nicer way. |
647 } | 648 } |
648 | 649 |
649 // Clear the existing maps. | 650 // Clear the existing maps. |
(...skipping 19 matching lines...) Expand all Loading... |
669 if (IsKeyboardLayout(input_method.id())) { | 670 if (IsKeyboardLayout(input_method.id())) { |
670 xkb_id_to_descriptor_.insert( | 671 xkb_id_to_descriptor_.insert( |
671 std::make_pair(input_method.GetPreferredKeyboardLayout(), | 672 std::make_pair(input_method.GetPreferredKeyboardLayout(), |
672 input_method)); | 673 input_method)); |
673 } | 674 } |
674 } | 675 } |
675 } | 676 } |
676 | 677 |
677 } // namespace input_method | 678 } // namespace input_method |
678 } // namespace chromeos | 679 } // namespace chromeos |
OLD | NEW |