Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / base / ime / chromeos / ime_bridge.h
index 79af952..bf28665 100644 (file)
@@ -8,6 +8,7 @@
 #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"
@@ -23,17 +24,17 @@ class KeyEvent;
 
 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;
@@ -112,8 +113,9 @@ class UI_BASE_EXPORT IBusPanelCandidateWindowHandlerInterface {
                                  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.