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

Unified Diff: ui/views/controls/combobox/combobox_listener.h

Issue 141523005: Combobox: Rename styles to STYLE_NORMAL and STYLE_ACTION and modify behaviors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix for Windows Created 6 years, 10 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 | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/combobox/combobox_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox_listener.h
diff --git a/ui/views/controls/combobox/combobox_listener.h b/ui/views/controls/combobox/combobox_listener.h
index faa41df89e4a113e97e461a0b1953dcc0f9078e5..2522e03c7d8fc483a162040e0180024fd0c266d5 100644
--- a/ui/views/controls/combobox/combobox_listener.h
+++ b/ui/views/controls/combobox/combobox_listener.h
@@ -11,15 +11,18 @@ namespace views {
class Combobox;
-// An interface implemented by an object to let it know that the selected index
-// has changed.
+// Interface used to notify consumers when something interesting happens to a
+// Combobox.
class VIEWS_EXPORT ComboboxListener {
public:
- virtual void OnSelectedIndexChanged(Combobox* combobox) = 0;
-
- // Handles when the combobox's style is the button style and the button is
- // clicked.
- virtual void OnComboboxTextButtonClicked(Combobox* combobox) {}
+ // Invoked when the user does the appropriate gesture that some action should
+ // be performed. For both STYLE_NORMAL and STYLE_ACTION this is invoked if the
+ // user clicks on the menu button and then clicks an item. For STYLE_NORMAL
+ // this is also invoked when the menu is not showing and the does a gesture to
+ // change the selection (for example, presses the home or end keys). This is
+ // not invoked when the menu is shown and the user changes the selection
+ // without closing the menu.
+ virtual void OnPerformAction(Combobox* combobox) = 0;
protected:
virtual ~ComboboxListener() {}
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/combobox/combobox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698