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_DESCRIPTOR_H_ | 5 #ifndef CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ |
6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ | 6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 namespace input_method { | 15 namespace input_method { |
16 | 16 |
17 class InputMethodWhitelist; | 17 class InputMethodWhitelist; |
18 | 18 |
19 // A structure which represents an input method. | 19 // A structure which represents an input method. |
20 class CHROMEOS_EXPORT InputMethodDescriptor { | 20 class CHROMEOS_EXPORT InputMethodDescriptor { |
21 public: | 21 public: |
22 InputMethodDescriptor(); | 22 InputMethodDescriptor(); |
23 InputMethodDescriptor(const std::string& id, | 23 InputMethodDescriptor(const std::string& id, |
24 const std::string& name, | 24 const std::string& name, |
25 const std::string& keyboard_layout, | 25 const std::string& keyboard_layout, |
26 const std::string& language_code, | 26 const std::string& language_code, |
27 const std::string& options_page_url); | 27 const std::string& options_page_url); |
28 ~InputMethodDescriptor(); | 28 ~InputMethodDescriptor(); |
29 | 29 |
30 bool operator==(const InputMethodDescriptor& other) const; | |
31 bool operator!=(const InputMethodDescriptor& other) const; | |
32 | |
33 const std::string& id() const { return id_; } | 30 const std::string& id() const { return id_; } |
34 const std::string& name() const { return name_; } | 31 const std::string& name() const { return name_; } |
35 const std::string& keyboard_layout() const { return keyboard_layout_; } | 32 const std::string& keyboard_layout() const { return keyboard_layout_; } |
36 const std::string& language_code() const { return language_code_; } | 33 const std::string& language_code() const { return language_code_; } |
37 const std::string& options_page_url() const { return options_page_url_; } | 34 const std::string& options_page_url() const { return options_page_url_; } |
38 | 35 |
39 private: | 36 private: |
40 // An ID that identifies an input method engine (e.g., "t:latn-post", | 37 // An ID that identifies an input method engine (e.g., "t:latn-post", |
41 // "pinyin", "hangul"). | 38 // "pinyin", "hangul"). |
42 std::string id_; | 39 std::string id_; |
(...skipping 11 matching lines...) Expand all Loading... |
54 // for input method extension. | 51 // for input method extension. |
55 std::string options_page_url_; | 52 std::string options_page_url_; |
56 }; | 53 }; |
57 | 54 |
58 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; | 55 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; |
59 | 56 |
60 } // namespace input_method | 57 } // namespace input_method |
61 } // namespace chromeos | 58 } // namespace chromeos |
62 | 59 |
63 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ | 60 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ |
OLD | NEW |