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

Unified Diff: views/view.h

Issue 6688049: New InputMethod api for Views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review feedbacks. 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
Index: views/view.h
diff --git a/views/view.h b/views/view.h
index e09f0beefc874ec995b1892433843988bdedba35..59e45f657b466cbea9ac8ac8d83e8d95ab99646d 100644
--- a/views/view.h
+++ b/views/view.h
@@ -52,9 +52,11 @@ class Background;
class Border;
class FocusManager;
class FocusTraversable;
+class InputMethod;
class LayoutManager;
class RootView;
class ScrollView;
+class TextInputClient;
class Widget;
class Window;
@@ -684,6 +686,15 @@ class View : public AcceleratorTarget {
// will be given a chance.
virtual bool OnMouseWheel(const MouseWheelEvent& event);
+ // Returns the View's TextInputClient instance or NULL if the View doesn't
+ // support text input.
+ virtual TextInputClient* GetTextInputClient();
+
+ // Convenience method to retrieve the InputMethod associated with the
+ // Widget that contains this view. Returns NULL if this view is not part of a
+ // view hierarchy with a Widget.
+ virtual InputMethod* GetInputMethod();
+
// Accelerators --------------------------------------------------------------
// Sets a keyboard accelerator for that view. When the user presses the

Powered by Google App Engine
This is Rietveld 408576698