Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: views/widget/widget_gtk.h

Issue 6675005: Integrate the new input method API for Views into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/widget.cc ('k') | views/widget/widget_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_gtk.h
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 9ddc0a4d626ce3b3d090dd52a543b963ef6ca430..323f8869fa20807961dfa461b7f27163a1dca33a 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);
// Enables debug painting. See |debug_paint_enabled_| for details.
static void EnableDebugPaint();
@@ -196,6 +199,8 @@ class WidgetGtk : public Widget,
virtual void SetMouseCapture() OVERRIDE;
virtual void ReleaseMouseCapture() OVERRIDE;
virtual bool HasMouseCapture() 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;
@@ -297,6 +302,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*);
// Returns the first ancestor of |widget| that is a window.
@@ -414,6 +422,8 @@ class WidgetGtk : public Widget,
// that window manager shows the window only after the window is painted.
bool painted_;
+ scoped_ptr<InputMethod> input_method_;
+
DISALLOW_COPY_AND_ASSIGN(WidgetGtk);
};
« no previous file with comments | « views/widget/widget.cc ('k') | views/widget/widget_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698