OLD | NEW |
1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_CONFIG_H_ | 5 #ifndef CHROMEOS_IME_INPUT_METHOD_CONFIG_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_CONFIG_H_ | 6 #define CHROMEOS_IME_INPUT_METHOD_CONFIG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
| 10 #include "chromeos/chromeos_export.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 namespace input_method { | 13 namespace input_method { |
13 | 14 |
14 // A structure which represents a value of an input method configuration item. | 15 // A structure which represents a value of an input method configuration item. |
15 // This struct is used by SetInputMethodConfig(). | 16 // This struct is used by SetInputMethodConfig(). |
16 struct InputMethodConfigValue { | 17 struct CHROMEOS_EXPORT InputMethodConfigValue { |
17 InputMethodConfigValue(); | 18 InputMethodConfigValue(); |
18 ~InputMethodConfigValue(); | 19 ~InputMethodConfigValue(); |
19 | 20 |
20 // Debug print function. | 21 // Debug print function. |
21 std::string ToString() const; | 22 std::string ToString() const; |
22 | 23 |
23 enum ValueType { | 24 enum ValueType { |
24 kValueTypeString = 0, | 25 kValueTypeString = 0, |
25 kValueTypeInt, | 26 kValueTypeInt, |
26 kValueTypeBool, | 27 kValueTypeBool, |
27 kValueTypeStringList, | 28 kValueTypeStringList, |
28 }; | 29 }; |
29 | 30 |
30 // A value is stored on |string_value| member if |type| is kValueTypeString. | 31 // A value is stored on |string_value| member if |type| is kValueTypeString. |
31 // The same is true for other enum values. | 32 // The same is true for other enum values. |
32 ValueType type; | 33 ValueType type; |
33 | 34 |
34 std::string string_value; | 35 std::string string_value; |
35 int int_value; | 36 int int_value; |
36 bool bool_value; | 37 bool bool_value; |
37 std::vector<std::string> string_list_value; | 38 std::vector<std::string> string_list_value; |
38 }; | 39 }; |
39 | 40 |
40 } // namespace input_method | 41 } // namespace input_method |
41 } // namespace chromeos | 42 } // namespace chromeos |
42 | 43 |
43 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_CONFIG_H_ | 44 #endif // CHROMEOS_IME_INPUT_METHOD_CONFIG_H_ |
OLD | NEW |