1 // Copyright 2013 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 #include "ui/base/ime/chromeos/fake_input_method_delegate.h"
8 namespace input_method
{
10 FakeInputMethodDelegate::FakeInputMethodDelegate()
11 : active_locale_("en") {
14 FakeInputMethodDelegate::~FakeInputMethodDelegate() {
17 std::string
FakeInputMethodDelegate::GetHardwareKeyboardLayouts() const {
18 return hardware_keyboard_layout_
;
21 base::string16
FakeInputMethodDelegate::GetLocalizedString(
22 int resource_id
) const {
23 if (!get_localized_string_callback_
.is_null())
24 return get_localized_string_callback_
.Run(resource_id
);
25 return base::string16();
28 base::string16
FakeInputMethodDelegate::GetDisplayLanguageName(
29 const std::string
& language_code
) const {
30 if (!get_display_language_name_callback_
.is_null())
31 return get_display_language_name_callback_
.Run(language_code
);
32 return base::string16();
35 void FakeInputMethodDelegate::SetHardwareKeyboardLayoutForTesting(
36 const std::string
& layout
) {
37 set_hardware_keyboard_layout(layout
);
40 } // namespace input_method
41 } // namespace chromeos