summaryrefslogtreecommitdiffstats
path: root/views/controls/textfield/textfield_controller.h
diff options
context:
space:
mode:
authorsuzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 22:34:21 +0000
committersuzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 22:34:21 +0000
commit8ca0956daa88097630611ee296a32e758305b067 (patch)
treeb2c22f0ebb163e72e0db2d6d2dbdbf9b7f09492e /views/controls/textfield/textfield_controller.h
parent3dd6e99d51bef9124984ab8a6ba8cead6531108a (diff)
downloadchromium_src-8ca0956daa88097630611ee296a32e758305b067.zip
chromium_src-8ca0956daa88097630611ee296a32e758305b067.tar.gz
chromium_src-8ca0956daa88097630611ee296a32e758305b067.tar.bz2
Refactor Textfield and AutocompleteEditViewViews.
Changes made by this CL: 1. Adds OnBeforeUserAction() and OnAfterUserAction() in TextfieldController. 2. Adds Textfield::HasSelection(). 3. Changes NativeTextfieldViews to use KeyEvent::GetCharacter(). 3. Refactors AutocompleteEditViewViews to use new TextfieldController methods. BUG=75003 TEST=views_unittests --gtest_filter=*Textfield* and interactive_ui_tests --gtest_filter=AutocompleteEditViewViews* Review URL: http://codereview.chromium.org/6685082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/textfield/textfield_controller.h')
-rw-r--r--views/controls/textfield/textfield_controller.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/views/controls/textfield/textfield_controller.h b/views/controls/textfield/textfield_controller.h
index 53fe97c..ee8df1b 100644
--- a/views/controls/textfield/textfield_controller.h
+++ b/views/controls/textfield/textfield_controller.h
@@ -26,6 +26,17 @@ class TextfieldController {
// further. If it returns false the processing continues.
virtual bool HandleKeyEvent(Textfield* sender,
const KeyEvent& key_event) = 0;
+
+ // Called before performing a user action that may change the textfield.
+ // It's currently only supported by Views implementation.
+ virtual void OnBeforeUserAction(Textfield* sender) {}
+
+ // Called after performing a user action that may change the textfield.
+ // It's currently only supported by Views implementation.
+ virtual void OnAfterUserAction(Textfield* sender) {}
+
+ protected:
+ virtual ~TextfieldController() {}
};
} // namespace views