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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 21 matching lines...) Expand all Loading... |
32 struct KeyEventHandle; | 32 struct KeyEventHandle; |
33 } // namespace input_method | 33 } // namespace input_method |
34 | 34 |
35 class InputMethodEngine : public InputMethodEngineInterface { | 35 class InputMethodEngine : public InputMethodEngineInterface { |
36 public: | 36 public: |
37 InputMethodEngine(); | 37 InputMethodEngine(); |
38 | 38 |
39 ~InputMethodEngine() override; | 39 ~InputMethodEngine() override; |
40 | 40 |
41 void Initialize(scoped_ptr<InputMethodEngineInterface::Observer> observer, | 41 void Initialize(scoped_ptr<InputMethodEngineInterface::Observer> observer, |
42 const char* extension_id); | 42 const char* extension_id, |
| 43 Profile* profile); |
43 | 44 |
44 // InputMethodEngineInterface overrides. | 45 // InputMethodEngineInterface overrides. |
45 const std::string& GetActiveComponentId() const override; | 46 const std::string& GetActiveComponentId() const override; |
46 bool SetComposition(int context_id, | 47 bool SetComposition(int context_id, |
47 const char* text, | 48 const char* text, |
48 int selection_start, | 49 int selection_start, |
49 int selection_end, | 50 int selection_end, |
50 int cursor, | 51 int cursor, |
51 const std::vector<SegmentInfo>& segments, | 52 const std::vector<SegmentInfo>& segments, |
52 std::string* error) override; | 53 std::string* error) override; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 // Mapping of candidate index to candidate id. | 137 // Mapping of candidate index to candidate id. |
137 std::vector<int> candidate_ids_; | 138 std::vector<int> candidate_ids_; |
138 | 139 |
139 // Mapping of candidate id to index. | 140 // Mapping of candidate id to index. |
140 std::map<int, int> candidate_indexes_; | 141 std::map<int, int> candidate_indexes_; |
141 | 142 |
142 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event | 143 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event |
143 // sent to ProcessKeyEvent is sent by SendKeyEvents. | 144 // sent to ProcessKeyEvent is sent by SendKeyEvents. |
144 const ui::KeyEvent* sent_key_event_; | 145 const ui::KeyEvent* sent_key_event_; |
| 146 |
| 147 Profile* profile_; |
145 }; | 148 }; |
146 | 149 |
147 } // namespace chromeos | 150 } // namespace chromeos |
148 | 151 |
149 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 152 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
OLD | NEW |