Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / views / controls / combobox / combobox_listener.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_LISTENER_H_
6 #define UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_LISTENER_H_
7
8 #include "ui/views/views_export.h"
9
10 namespace views {
11
12 class Combobox;
13
14 // Interface used to notify consumers when something interesting happens to a
15 // Combobox.
16 class VIEWS_EXPORT ComboboxListener {
17  public:
18   // Invoked when the user does the appropriate gesture that some action should
19   // be performed. For both STYLE_NORMAL and STYLE_ACTION this is invoked if the
20   // user clicks on the menu button and then clicks an item. For STYLE_NORMAL
21   // this is also invoked when the menu is not showing and the does a gesture to
22   // change the selection (for example, presses the home or end keys). This is
23   // not invoked when the menu is shown and the user changes the selection
24   // without closing the menu.
25   virtual void OnPerformAction(Combobox* combobox) = 0;
26
27  protected:
28   virtual ~ComboboxListener() {}
29 };
30
31 }  // namespace views
32
33 #endif  // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_LISTENER_H_