| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ | 5 #ifndef UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ |
| 6 #define UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ | 6 #define UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, | 92 virtual void ProcessKeyEvent(const ui::KeyEvent& key_event, |
| 93 const KeyEventDoneCallback& callback) = 0; | 93 const KeyEventDoneCallback& callback) = 0; |
| 94 | 94 |
| 95 // Called when the candidate in lookup table is clicked. The |index| is 0 | 95 // Called when the candidate in lookup table is clicked. The |index| is 0 |
| 96 // based candidate index in lookup table. | 96 // based candidate index in lookup table. |
| 97 virtual void CandidateClicked(uint32 index) = 0; | 97 virtual void CandidateClicked(uint32 index) = 0; |
| 98 | 98 |
| 99 // Called when a new surrounding text is set. The |text| is surrounding text | 99 // Called when a new surrounding text is set. The |text| is surrounding text |
| 100 // and |cursor_pos| is 0 based index of cursor position in |text|. If there is | 100 // and |cursor_pos| is 0 based index of cursor position in |text|. If there is |
| 101 // selection range, |anchor_pos| represents opposite index from |cursor_pos|. | 101 // selection range, |anchor_pos| represents opposite index from |cursor_pos|. |
| 102 // Otherwise |anchor_pos| is equal to |cursor_pos|. | 102 // Otherwise |anchor_pos| is equal to |cursor_pos|. If not all surrounding |
| 103 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, | 103 // text is given |offset_pos| indicates the starting offset of |text|. |
| 104 uint32 anchor_pos) = 0; | 104 virtual void SetSurroundingText(const std::string& text, |
| 105 uint32 cursor_pos, |
| 106 uint32 anchor_pos, |
| 107 uint32 offset_pos) = 0; |
| 105 | 108 |
| 106 // Called when the composition bounds changed. | 109 // Called when the composition bounds changed. |
| 107 virtual void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) = 0; | 110 virtual void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) = 0; |
| 108 | 111 |
| 109 // Returns whether the engine is interested in key events. | 112 // Returns whether the engine is interested in key events. |
| 110 // If not, InputMethodChromeOS won't feed it with key events. | 113 // If not, InputMethodChromeOS won't feed it with key events. |
| 111 virtual bool IsInterestedInKeyEvent() const = 0; | 114 virtual bool IsInterestedInKeyEvent() const = 0; |
| 112 | 115 |
| 113 protected: | 116 protected: |
| 114 IMEEngineHandlerInterface() {} | 117 IMEEngineHandlerInterface() {} |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 protected: | 200 protected: |
| 198 IMEBridge(); | 201 IMEBridge(); |
| 199 | 202 |
| 200 private: | 203 private: |
| 201 DISALLOW_COPY_AND_ASSIGN(IMEBridge); | 204 DISALLOW_COPY_AND_ASSIGN(IMEBridge); |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace chromeos | 207 } // namespace chromeos |
| 205 | 208 |
| 206 #endif // UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ | 209 #endif // UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ |
| OLD | NEW |