| Index: views/controls/menu/submenu_view.h
|
| diff --git a/views/controls/menu/submenu_view.h b/views/controls/menu/submenu_view.h
|
| index e176ac97f2dfba5cc27e3626c4c8925539111acb..4aa31fa3584c1c295e3f1d41000ef01977d23b0d 100644
|
| --- a/views/controls/menu/submenu_view.h
|
| +++ b/views/controls/menu/submenu_view.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "views/controls/menu/menu_delegate.h"
|
| #include "views/view.h"
|
| +#include "ui/views/animation/scroll_animator.h"
|
|
|
| namespace views {
|
|
|
| @@ -32,7 +33,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[];
|
| @@ -73,6 +75,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();
|
|
|
| @@ -169,6 +174,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_;
|
|
|
| @@ -195,6 +203,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);
|
| };
|
|
|
|
|