OLD | NEW |
---|---|
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 #ifndef CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ | 5 #ifndef CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ |
6 #define CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ | 6 #define CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 namespace input_method { | 14 namespace input_method { |
15 | 15 |
16 // Provides access to read/persist Input Method-related properties. | 16 // Provides access to read/persist Input Method-related properties. |
17 class InputMethodDelegate { | 17 class InputMethodDelegate { |
18 public: | 18 public: |
19 InputMethodDelegate() {} | 19 InputMethodDelegate() {} |
20 virtual ~InputMethodDelegate() {} | 20 virtual ~InputMethodDelegate() {} |
21 | 21 |
22 // Retrieves the hardware keyboard layout ID. May return an empty string if | 22 // Retrieves the hardware keyboard layout IDs. May return an empty list if |
23 // the ID is unknown. | 23 // the IDs are unknown. |
24 virtual std::string GetHardwareKeyboardLayout() const = 0; | 24 virtual void GetHardwareKeyboardLayout( |
Alexander Alekseev
2014/02/11 13:36:02
virtual const std::vector<std::string>& GetHardwar
Seigo Nonaka
2014/02/12 13:21:02
Done.
Alexander Alekseev
2014/02/12 14:45:35
Let's return "const std::string&" here, and split
| |
25 std::vector<std::string>* out) const = 0; | |
25 | 26 |
26 // Retrieves localized string for |resource_id|. | 27 // Retrieves localized string for |resource_id|. |
27 virtual base::string16 GetLocalizedString(int resource_id) const = 0; | 28 virtual base::string16 GetLocalizedString(int resource_id) const = 0; |
28 | 29 |
29 // Converts a language code to a language display name, using the | 30 // Converts a language code to a language display name, using the |
30 // current application locale. | 31 // current application locale. |
31 // Examples: "fi" => "Finnish" | 32 // Examples: "fi" => "Finnish" |
32 // "en-US" => "English (United States)" | 33 // "en-US" => "English (United States)" |
33 virtual base::string16 GetDisplayLanguageName( | 34 virtual base::string16 GetDisplayLanguageName( |
34 const std::string& language_code) const = 0; | 35 const std::string& language_code) const = 0; |
35 | 36 |
36 private: | 37 private: |
37 DISALLOW_COPY_AND_ASSIGN(InputMethodDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(InputMethodDelegate); |
38 }; | 39 }; |
39 | 40 |
40 } // namespace input_method | 41 } // namespace input_method |
41 } // namespace chromeos | 42 } // namespace chromeos |
42 | 43 |
43 #endif // CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ | 44 #endif // CHROMEOS_IME_INPUT_METHOD_DELEGATE_H_ |
OLD | NEW |