Index: views/widget/widget_gtk.h |
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h |
index ed9e9fb3d0ad3167ceaa3145b6f4bdd83f86dd17..92d8dc6a9657e846af219935ee5b145cf6793d7a 100644 |
--- a/views/widget/widget_gtk.h |
+++ b/views/widget/widget_gtk.h |
@@ -13,6 +13,8 @@ |
#include "ui/base/x/active_window_watcher_x.h" |
#include "ui/gfx/size.h" |
#include "views/focus/focus_manager.h" |
+#include "views/ime/input_method_delegate.h" |
+#include "views/ime/input_method_gtk.h" |
#include "views/widget/native_widget.h" |
#include "views/widget/widget.h" |
@@ -41,7 +43,8 @@ class NativeWidgetDelegate; |
// Widget implementation for GTK. |
class WidgetGtk : public Widget, |
public NativeWidget, |
- public ui::ActiveWindowWatcherX::Observer { |
+ public ui::ActiveWindowWatcherX::Observer, |
+ public internal::InputMethodDelegate { |
public: |
// Type of widget. |
enum Type { |
@@ -171,7 +174,7 @@ class WidgetGtk : public Widget, |
// Handles a keyboard event by sending it to our focus manager. |
// Returns true if it's handled by the focus manager. |
- bool HandleKeyboardEvent(GdkEventKey* event); |
+ bool HandleKeyboardEvent(const KeyEvent& key); |
// Returns the view::Event::flags for a GdkEventButton. |
static int GetFlagsForEventButton(const GdkEventButton& event); |
@@ -188,6 +191,8 @@ class WidgetGtk : public Widget, |
virtual void SetNativeCapture() OVERRIDE; |
virtual void ReleaseNativeCapture() OVERRIDE; |
virtual bool HasNativeCapture() const OVERRIDE; |
+ virtual InputMethod* GetInputMethodNative() OVERRIDE; |
+ virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE; |
virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE; |
virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE; |
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
@@ -295,6 +300,9 @@ class WidgetGtk : public Widget, |
// Overridden from NativeWidget |
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
+ // Overridden from internal::InputMethodDelegate |
+ virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; |
+ |
CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnWindowPaint, GdkEventExpose*); |
// Process a mouse click. |
@@ -428,6 +436,8 @@ class WidgetGtk : public Widget, |
// view the drag started from. |
View* dragged_view_; |
+ scoped_ptr<InputMethod> input_method_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WidgetGtk); |
}; |