| 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 "chromeos/ime/input_method_descriptor.h" | 12 #include "chromeos/ime/input_method_descriptor.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class CandidateWindow; | 16 class CandidateWindow; |
| 17 class KeyEvent; | 17 class KeyEvent; |
| 18 } // namespace ui | 18 } // namespace ui |
| 19 | 19 |
| 20 namespace ash { |
| 21 namespace ime { |
| 22 struct InputMethodMenuItem; |
| 23 } // namespace ime |
| 24 } // namespace ash |
| 25 |
| 20 namespace chromeos { | 26 namespace chromeos { |
| 21 | 27 |
| 22 class CompositionText; | 28 class CompositionText; |
| 23 | 29 |
| 24 namespace input_method { | 30 namespace input_method { |
| 25 struct InputMethodProperty; | |
| 26 struct KeyEventHandle; | 31 struct KeyEventHandle; |
| 27 } // namespace input_method | 32 } // namespace input_method |
| 28 | 33 |
| 29 class InputMethodEngine : public InputMethodEngineInterface { | 34 class InputMethodEngine : public InputMethodEngineInterface { |
| 30 public: | 35 public: |
| 31 InputMethodEngine(); | 36 InputMethodEngine(); |
| 32 | 37 |
| 33 virtual ~InputMethodEngine(); | 38 virtual ~InputMethodEngine(); |
| 34 | 39 |
| 35 void Initialize( | 40 void Initialize( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 virtual void PropertyActivate(const std::string& property_name) OVERRIDE; | 93 virtual void PropertyActivate(const std::string& property_name) OVERRIDE; |
| 89 virtual void Reset() OVERRIDE; | 94 virtual void Reset() OVERRIDE; |
| 90 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, | 95 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, |
| 91 const KeyEventDoneCallback& callback) OVERRIDE; | 96 const KeyEventDoneCallback& callback) OVERRIDE; |
| 92 virtual void CandidateClicked(uint32 index) OVERRIDE; | 97 virtual void CandidateClicked(uint32 index) OVERRIDE; |
| 93 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, | 98 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, |
| 94 uint32 anchor_pos) OVERRIDE; | 99 uint32 anchor_pos) OVERRIDE; |
| 95 virtual void HideInputView() OVERRIDE; | 100 virtual void HideInputView() OVERRIDE; |
| 96 | 101 |
| 97 private: | 102 private: |
| 98 // Converts MenuItem to InputMethodProperty. | 103 // Converts MenuItem to InputMethodMenuItem. |
| 99 void MenuItemToProperty(const MenuItem& item, | 104 void MenuItemToProperty(const MenuItem& item, |
| 100 input_method::InputMethodProperty* property); | 105 ash::ime::InputMethodMenuItem* property); |
| 101 | 106 |
| 102 // Descriptor of this input method. | 107 // Descriptor of this input method. |
| 103 input_method::InputMethodDescriptor descriptor_; | 108 input_method::InputMethodDescriptor descriptor_; |
| 104 | 109 |
| 105 // True if the current context has focus. | 110 // True if the current context has focus. |
| 106 bool focused_; | 111 bool focused_; |
| 107 | 112 |
| 108 // True if this engine is active. | 113 // True if this engine is active. |
| 109 bool active_; | 114 bool active_; |
| 110 | 115 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 GURL input_view_url_; | 154 GURL input_view_url_; |
| 150 | 155 |
| 151 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event | 156 // Used with SendKeyEvents and ProcessKeyEvent to check if the key event |
| 152 // sent to ProcessKeyEvent is sent by SendKeyEvents. | 157 // sent to ProcessKeyEvent is sent by SendKeyEvents. |
| 153 const ui::KeyEvent* sent_key_event_; | 158 const ui::KeyEvent* sent_key_event_; |
| 154 }; | 159 }; |
| 155 | 160 |
| 156 } // namespace chromeos | 161 } // namespace chromeos |
| 157 | 162 |
| 158 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 163 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
| OLD | NEW |