Revert 264226 "Reduce dependency of TiclInvalidationService on P..."
[chromium-blink-merge.git] / chromeos / ime / fake_input_method_delegate.h
blob0c0b385459633d296ed7acd3483cb22541cedcd7
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 #ifndef CHROMEOS_IME_FAKE_INPUT_METHOD_DELEGATE_H_
6 #define CHROMEOS_IME_FAKE_INPUT_METHOD_DELEGATE_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "base/compiler_specific.h"
13 #include "chromeos/chromeos_export.h"
14 #include "chromeos/ime/input_method_delegate.h"
16 namespace chromeos {
17 namespace input_method {
19 class CHROMEOS_EXPORT FakeInputMethodDelegate : public InputMethodDelegate {
20 public:
21 typedef base::Callback<base::string16 (const std::string& language_code)>
22 LanguageNameLocalizationCallback;
23 typedef base::Callback<base::string16 (int resource_id)>
24 GetLocalizedStringCallback;
26 FakeInputMethodDelegate();
27 virtual ~FakeInputMethodDelegate();
29 // InputMethodDelegate implementation:
30 virtual std::string GetHardwareKeyboardLayouts() const OVERRIDE;
31 virtual base::string16 GetLocalizedString(int resource_id) const OVERRIDE;
32 virtual void SetHardwareKeyboardLayoutForTesting(
33 const std::string& layout) OVERRIDE;
34 virtual base::string16 GetDisplayLanguageName(
35 const std::string& language_code) const OVERRIDE;
37 void set_hardware_keyboard_layout(const std::string& value) {
38 hardware_keyboard_layout_ = value;
41 void set_active_locale(const std::string& value) {
42 active_locale_ = value;
45 void set_get_display_language_name_callback(
46 const LanguageNameLocalizationCallback& callback) {
47 get_display_language_name_callback_ = callback;
50 void set_get_localized_string_callback(
51 const GetLocalizedStringCallback& callback) {
52 get_localized_string_callback_ = callback;
55 private:
56 std::string hardware_keyboard_layout_;
57 std::string active_locale_;
58 LanguageNameLocalizationCallback get_display_language_name_callback_;
59 GetLocalizedStringCallback get_localized_string_callback_;
60 DISALLOW_COPY_AND_ASSIGN(FakeInputMethodDelegate);
63 } // namespace input_method
64 } // namespace chromeos
66 #endif // CHROMEOS_IME_FAKE_INPUT_METHOD_DELEGATE_H_