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

Unified Diff: views/widget/widget.h

Issue 6823055: Consolidate OnKeyEvent and InputMethod code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor X2Event handling, nix Windows InputMethodDelegate, etc. Created 9 years, 8 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
Index: views/widget/widget.h
diff --git a/views/widget/widget.h b/views/widget/widget.h
index aac024edcecc47bda6f5d0ecbe4c7473efad597b..fc57902b7d0fb6bc50e75602220b93b062464413 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -13,6 +13,7 @@
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/gfx/native_widget_types.h"
#include "views/focus/focus_manager.h"
+#include "views/ime/input_method_delegate.h"
#include "views/widget/native_widget_delegate.h"
namespace gfx {
@@ -59,7 +60,8 @@ class Window;
// transitional step.
//
class Widget : public internal::NativeWidgetDelegate,
- public FocusTraversable {
+ public FocusTraversable,
+ public internal::InputMethodDelegate {
public:
struct CreateParams {
enum Type {
@@ -299,6 +301,7 @@ class Widget : public internal::NativeWidgetDelegate,
virtual void OnSizeChanged(const gfx::Size& new_size) OVERRIDE;
virtual bool HasFocusManager() const OVERRIDE;
virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual bool OnKeyEvent(const KeyEvent& event) OVERRIDE;
virtual bool OnMouseEvent(const MouseEvent& event) OVERRIDE;
virtual void OnMouseCaptureLost() OVERRIDE;
@@ -307,6 +310,9 @@ class Widget : public internal::NativeWidgetDelegate,
virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
virtual View* GetFocusTraversableParentView() OVERRIDE;
+ // Overridden from internal::InputMethodDelegate
+ virtual bool DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
+
protected:
// Creates the RootView to be used within this Widget. Subclasses may override
// to create custom RootViews that do specialized event processing.

Powered by Google App Engine
This is Rietveld 408576698