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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // based candidate index in lookup table. | 95 // based candidate index in lookup table. |
96 virtual void CandidateClicked(uint32 index) = 0; | 96 virtual void CandidateClicked(uint32 index) = 0; |
97 | 97 |
98 // Called when a new surrounding text is set. The |text| is surrounding text | 98 // Called when a new surrounding text is set. The |text| is surrounding text |
99 // and |cursor_pos| is 0 based index of cursor position in |text|. If there is | 99 // and |cursor_pos| is 0 based index of cursor position in |text|. If there is |
100 // selection range, |anchor_pos| represents opposite index from |cursor_pos|. | 100 // selection range, |anchor_pos| represents opposite index from |cursor_pos|. |
101 // Otherwise |anchor_pos| is equal to |cursor_pos|. | 101 // Otherwise |anchor_pos| is equal to |cursor_pos|. |
102 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, | 102 virtual void SetSurroundingText(const std::string& text, uint32 cursor_pos, |
103 uint32 anchor_pos) = 0; | 103 uint32 anchor_pos) = 0; |
104 | 104 |
| 105 // Called when the composition bounds changed. |
| 106 virtual void SetCompositionBounds(const gfx::Rect& bounds) = 0; |
| 107 |
105 protected: | 108 protected: |
106 IMEEngineHandlerInterface() {} | 109 IMEEngineHandlerInterface() {} |
107 }; | 110 }; |
108 | 111 |
109 // A interface to handle the candidate window related method call. | 112 // A interface to handle the candidate window related method call. |
110 class UI_BASE_EXPORT IMECandidateWindowHandlerInterface { | 113 class UI_BASE_EXPORT IMECandidateWindowHandlerInterface { |
111 public: | 114 public: |
112 virtual ~IMECandidateWindowHandlerInterface() {} | 115 virtual ~IMECandidateWindowHandlerInterface() {} |
113 | 116 |
114 // Called when the IME updates the lookup table. | 117 // Called when the IME updates the lookup table. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 protected: | 188 protected: |
186 IMEBridge(); | 189 IMEBridge(); |
187 | 190 |
188 private: | 191 private: |
189 DISALLOW_COPY_AND_ASSIGN(IMEBridge); | 192 DISALLOW_COPY_AND_ASSIGN(IMEBridge); |
190 }; | 193 }; |
191 | 194 |
192 } // namespace chromeos | 195 } // namespace chromeos |
193 | 196 |
194 #endif // UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ | 197 #endif // UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ |
OLD | NEW |