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

Side by Side Diff: chromeos/ime/mock_input_method_delegate.cc

Issue 14200032: Decouple l10n_util from InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "chromeos/ime/mock_input_method_delegate.h" 5 #include "chromeos/ime/mock_input_method_delegate.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace input_method { 8 namespace input_method {
9 9
10 MockInputMethodDelegate::MockInputMethodDelegate() 10 MockInputMethodDelegate::MockInputMethodDelegate()
11 : active_locale_("en") { 11 : active_locale_("en") {
12 } 12 }
13 13
14 MockInputMethodDelegate::~MockInputMethodDelegate() { 14 MockInputMethodDelegate::~MockInputMethodDelegate() {
15 } 15 }
16 16
17 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const { 17 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const {
18 return hardware_keyboard_layout_; 18 return hardware_keyboard_layout_;
19 } 19 }
20 20
21 std::string MockInputMethodDelegate::GetActiveLocale() const { 21 string16 MockInputMethodDelegate::GetLocalizedString(int resource_id) const {
22 return active_locale_; 22 if (!get_localized_string_callback_.is_null())
23 return get_localized_string_callback_.Run(resource_id);
24 return string16();
25 }
26
27 string16 MockInputMethodDelegate::GetDisplayLanguageName(
28 const std::string& language_code) const {
29 if (!get_display_language_name_callback_.is_null())
30 return get_display_language_name_callback_.Run(language_code);
31 return string16();
23 } 32 }
24 33
25 } // namespace input_method 34 } // namespace input_method
26 } // namespace chromeos 35 } // namespace chromeos
OLDNEW
« chromeos/ime/mock_input_method_delegate.h ('K') | « chromeos/ime/mock_input_method_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698