#include <string>
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/strings/string16.h"
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/ui_base_export.h"
namespace chromeos {
-class IBusText;
+class CompositionText;
class UI_BASE_EXPORT IBusInputContextHandlerInterface {
public:
// Called when the engine commit a text.
virtual void CommitText(const std::string& text) = 0;
- // Called when the engine update preedit stroing.
- virtual void UpdatePreeditText(const IBusText& text,
- uint32 cursor_pos,
- bool visible) = 0;
+ // Called when the engine updates composition text.
+ virtual void UpdateCompositionText(const CompositionText& text,
+ uint32 cursor_pos,
+ bool visible) = 0;
// Called when the engine request deleting surrounding string.
virtual void DeleteSurroundingText(int32 offset, uint32 length) = 0;
bool visible) = 0;
// Called when the IME updates the preedit text. The |text| is given in
- // UTF-8 encoding.
- virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos,
+ // UTF-16 encoding.
+ virtual void UpdatePreeditText(const base::string16& text,
+ uint32 cursor_pos,
bool visible) = 0;
// Called when the application changes its caret bounds.