diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 17:03:30 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 17:03:30 +0000 |
commit | d928570ffba669f58d7c0b7a6d2707c6b702be31 (patch) | |
tree | 2ee50374e4e509a6c418eafcfbbc9ad800139a6e /views/controls/menu/menu_2.h | |
parent | aca8ac48a381254b79a28cc4562f40bb8e7dce99 (diff) | |
download | chromium_src-d928570ffba669f58d7c0b7a6d2707c6b702be31.zip chromium_src-d928570ffba669f58d7c0b7a6d2707c6b702be31.tar.gz chromium_src-d928570ffba669f58d7c0b7a6d2707c6b702be31.tar.bz2 |
views: Factor out MenuListener into its own header file.
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7969011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/menu_2.h')
-rw-r--r-- | views/controls/menu/menu_2.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/views/controls/menu/menu_2.h b/views/controls/menu/menu_2.h index 5a93179..4460eea 100644 --- a/views/controls/menu/menu_2.h +++ b/views/controls/menu/menu_2.h @@ -6,8 +6,9 @@ #define VIEWS_CONTROLS_MENU_MENU_2_H_ #pragma once +#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "ui/base/models/menu_model.h" +#include "ui/gfx/native_widget_types.h" #include "views/controls/menu/menu_wrapper.h" #include "views/views_export.h" @@ -15,10 +16,13 @@ namespace gfx { class Point; } +namespace ui { +class MenuModel; +} + namespace views { class NativeMenuGtk; -class View; // A menu. Populated from a model, and relies on a delegate to execute commands. // @@ -27,6 +31,13 @@ class View; // ActivatedAt is never invoked. class VIEWS_EXPORT Menu2 { public: + // How the menu is aligned relative to the point it is shown at. + // The alignment is reversed by menu if text direction is right to left. + enum Alignment { + ALIGN_TOPLEFT, + ALIGN_TOPRIGHT + }; + // Creates a new menu populated with the contents of |model|. // WARNING: this populates the menu on construction by invoking methods on // the model. As such, it is typically not safe to use this as the model @@ -36,13 +47,6 @@ class VIEWS_EXPORT Menu2 { explicit Menu2(ui::MenuModel* model); virtual ~Menu2(); - // How the menu is aligned relative to the point it is shown at. - // The alignment is reversed by menu if text direction is right to left. - enum Alignment { - ALIGN_TOPLEFT, - ALIGN_TOPRIGHT - }; - // Runs the menu at the specified point. This method blocks until done. // RunContextMenuAt is the same, but the alignment is the default for a // context menu. |