OLD | NEW |
| (Empty) |
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_BUTTON_MENU_BUTTON_DELEGATE_H_ | |
6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include "ui/views/views_export.h" | |
10 | |
11 namespace gfx { | |
12 class Point; | |
13 } | |
14 | |
15 namespace views { | |
16 | |
17 class View; | |
18 | |
19 //////////////////////////////////////////////////////////////////////////////// | |
20 // | |
21 // MenuButtonDelegate | |
22 // | |
23 // An interface that allows a component to tell a View about a menu that it | |
24 // has constructed that the view can show (e.g. for MenuButton views, or as a | |
25 // context menu.) | |
26 // | |
27 //////////////////////////////////////////////////////////////////////////////// | |
28 class VIEWS_EXPORT MenuButtonDelegate { | |
29 public: | |
30 // Creates and shows a menu at the specified position. |source| is the view | |
31 // the MenuButtonDelegate was set on. | |
32 virtual void RunMenu(View* source, const gfx::Point& point) = 0; | |
33 | |
34 protected: | |
35 virtual ~MenuButtonDelegate() {} | |
36 }; | |
37 | |
38 } // namespace views | |
39 | |
40 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ | |
OLD | NEW |