Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / ime / input_method_context_impl_wayland.h
index b2645e5..bfb7de9 100644 (file)
@@ -5,7 +5,10 @@
 #ifndef OZONE_UI_IME_INPUT_METHOD_CONTEXT_IMPL_WAYLAND_H_
 #define OZONE_UI_IME_INPUT_METHOD_CONTEXT_IMPL_WAYLAND_H_
 
+#include <string>
+
 #include "ozone/platform/ozone_export_wayland.h"
+#include "ozone/ui/events/ime_change_observer.h"
 #include "ui/base/ime/linux/linux_input_method_context.h"
 #include "ui/gfx/rect.h"
 
@@ -14,18 +17,24 @@ namespace ui {
 // An implementation of LinuxInputMethodContext for IME support on Ozone
 // platform using Wayland.
 class OZONE_WAYLAND_EXPORT InputMethodContextImplWayland
-    : public LinuxInputMethodContext {
+  : public LinuxInputMethodContext,
+    public IMEChangeObserver {
  public:
   explicit InputMethodContextImplWayland(
       ui::LinuxInputMethodContextDelegate* delegate);
   virtual ~InputMethodContextImplWayland();
 
-  // Overriden from ui::LinuxInputMethodContext
-  virtual bool DispatchKeyEvent(const ui::KeyEvent& key_event) OVERRIDE;
-  virtual void Reset() OVERRIDE;
-  virtual void OnTextInputTypeChanged(ui::TextInputType text_input_type)
-      OVERRIDE;
-  virtual void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) OVERRIDE;
+  // overriden from ui::LinuxInputMethodContext
+  bool DispatchKeyEvent(const ui::KeyEvent& key_event) override;
+  void Reset() override;
+  void OnTextInputTypeChanged(ui::TextInputType text_input_type) override;
+  void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override;
+
+  // overriden from ui::IMEChangeObserver
+  void OnPreeditChanged(unsigned handle,
+                        const std::string& text,
+                        const std::string& commit) override;
+  void OnCommit(unsigned handle, const std::string& text) override;
 
  private:
   // Must not be NULL.