Chromium Code Reviews| Index: ui/views/controls/menu/submenu_view.h |
| diff --git a/ui/views/controls/menu/submenu_view.h b/ui/views/controls/menu/submenu_view.h |
| index d4d0497df4db455db0967e1e8c921849e38bb739..15cc80ed4e265707326a1420e1c8c1b9e34d6a0a 100644 |
| --- a/ui/views/controls/menu/submenu_view.h |
| +++ b/ui/views/controls/menu/submenu_view.h |
| @@ -11,6 +11,7 @@ |
| #include "base/compiler_specific.h" |
| #include "ui/views/controls/menu/menu_delegate.h" |
| #include "ui/views/view.h" |
| +#include "ui/views/animation/scroll_animator.h" |
|
sadrul
2012/01/19 15:46:47
sort
|
| namespace views { |
| @@ -33,7 +34,8 @@ class MenuScrollViewContainer; |
| // MenuScrollViewContainer handles showing as much of the SubmenuView as the |
| // screen allows. If the SubmenuView is taller than the screen, scroll buttons |
| // are provided that allow the user to see all the menu items. |
| -class VIEWS_EXPORT SubmenuView : public View { |
| +class VIEWS_EXPORT SubmenuView : public View, |
| + public ScrollDelegate { |
| public: |
| // The submenu's class name. |
| static const char kViewClassName[]; |
| @@ -74,6 +76,9 @@ class VIEWS_EXPORT SubmenuView : public View { |
| // Scrolls on menu item boundaries. |
| virtual bool OnMouseWheel(const MouseWheelEvent& e) OVERRIDE; |
| + // Scrolls on menu item boundaries. |
| + virtual ui::GestureStatus OnGestureEvent(const GestureEvent& e) OVERRIDE; |
| + |
| // Returns true if the menu is showing. |
| bool IsShowing(); |
| @@ -170,6 +175,9 @@ class VIEWS_EXPORT SubmenuView : public View { |
| gfx::Rect CalculateDropIndicatorBounds(MenuItemView* item, |
| MenuDelegate::DropPosition position); |
| + // Implementation of ScrollDelegate |
| + virtual void OnScroll(float dx, float dy) OVERRIDE; |
| + |
| // Parent menu item. |
| MenuItemView* parent_menu_item_; |
| @@ -196,6 +204,9 @@ class VIEWS_EXPORT SubmenuView : public View { |
| // Reposition open menu when contained views change size. |
| bool resize_open_menu_; |
| + // The submenu's scroll animator |
| + scoped_ptr<ScrollAnimator> scroll_animator_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(SubmenuView); |
| }; |