Index: views/widget/widget.h |
diff --git a/views/widget/widget.h b/views/widget/widget.h |
index b09493230de2bb07ae6aa446a5d17317c04a9503..aafac85f97206db4ba9068fa358dc519adffad37 100644 |
--- a/views/widget/widget.h |
+++ b/views/widget/widget.h |
@@ -33,6 +33,7 @@ using ui::ThemeProvider; |
namespace views { |
class DefaultThemeProvider; |
+class InputMethod; |
class NativeWidget; |
class RootView; |
class TooltipManager; |
@@ -218,6 +219,10 @@ class Widget : public internal::NativeWidgetDelegate, |
// TODO(beng): remove virtual. |
virtual FocusManager* GetFocusManager(); |
+ // Returns the InputMethod for this widget. |
+ // Note that all widgets in a widget hierarchy share the same input method. |
+ InputMethod* GetInputMethod() const; |
+ |
// Returns true if the native view |native_view| is contained in the |
// views::View hierarchy rooted at this widget. |
// TODO(beng): const. |
@@ -267,7 +272,7 @@ class Widget : public internal::NativeWidgetDelegate, |
ui::AccessibilityTypes::Event event_type, |
bool send_native_event) = 0; |
- NativeWidget* native_widget() { return native_widget_; } |
+ NativeWidget* native_widget() const { return native_widget_; } |
// Overridden from NativeWidgetDelegate: |
virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE; |