| 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> |
| 11 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h" | 11 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 class CandidateWindow; |
| 15 class KeyEvent; | 16 class KeyEvent; |
| 16 } // namespace ui | 17 } // namespace ui |
| 17 | 18 |
| 18 namespace chromeos { | 19 namespace chromeos { |
| 19 | 20 |
| 20 class IBusText; | 21 class IBusText; |
| 21 | 22 |
| 22 namespace input_method { | 23 namespace input_method { |
| 23 class CandidateWindow; | |
| 24 struct InputMethodProperty; | 24 struct InputMethodProperty; |
| 25 struct KeyEventHandle; | 25 struct KeyEventHandle; |
| 26 } // namespace input_method | 26 } // namespace input_method |
| 27 | 27 |
| 28 class InputMethodEngine : public InputMethodEngineInterface { | 28 class InputMethodEngine : public InputMethodEngineInterface { |
| 29 public: | 29 public: |
| 30 InputMethodEngine(); | 30 InputMethodEngine(); |
| 31 | 31 |
| 32 virtual ~InputMethodEngine(); | 32 virtual ~InputMethodEngine(); |
| 33 | 33 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 std::string ibus_id_; | 115 std::string ibus_id_; |
| 116 | 116 |
| 117 // Pointer to the object recieving events for this IME. | 117 // Pointer to the object recieving events for this IME. |
| 118 InputMethodEngineInterface::Observer* observer_; | 118 InputMethodEngineInterface::Observer* observer_; |
| 119 | 119 |
| 120 // The current preedit text, and it's cursor position. | 120 // The current preedit text, and it's cursor position. |
| 121 scoped_ptr<IBusText> preedit_text_; | 121 scoped_ptr<IBusText> preedit_text_; |
| 122 int preedit_cursor_; | 122 int preedit_cursor_; |
| 123 | 123 |
| 124 // The current candidate window. | 124 // The current candidate window. |
| 125 scoped_ptr<input_method::CandidateWindow> candidate_window_; | 125 scoped_ptr<ui::CandidateWindow> candidate_window_; |
| 126 | 126 |
| 127 // The current candidate window property. | 127 // The current candidate window property. |
| 128 CandidateWindowProperty candidate_window_property_; | 128 CandidateWindowProperty candidate_window_property_; |
| 129 | 129 |
| 130 // Indicates whether the candidate window is visible. | 130 // Indicates whether the candidate window is visible. |
| 131 bool window_visible_; | 131 bool window_visible_; |
| 132 | 132 |
| 133 // Mapping of candidate index to candidate id. | 133 // Mapping of candidate index to candidate id. |
| 134 std::vector<int> candidate_ids_; | 134 std::vector<int> candidate_ids_; |
| 135 | 135 |
| 136 // Mapping of candidate id to index. | 136 // Mapping of candidate id to index. |
| 137 std::map<int, int> candidate_indexes_; | 137 std::map<int, int> candidate_indexes_; |
| 138 | 138 |
| 139 // Used for input view window. | 139 // Used for input view window. |
| 140 GURL input_view_url_; | 140 GURL input_view_url_; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace chromeos | 143 } // namespace chromeos |
| 144 | 144 |
| 145 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 145 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
| OLD | NEW |