| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_VIEWS_CHROME_MENU_H__ | 5 #ifndef CHROME_VIEWS_CHROME_MENU_H__ |
| 6 #define CHROME_VIEWS_CHROME_MENU_H__ | 6 #define CHROME_VIEWS_CHROME_MENU_H__ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/gfx/point.h" | 10 #include "base/gfx/point.h" |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 | 750 |
| 751 // Returns the target for the mouse event. | 751 // Returns the target for the mouse event. |
| 752 MenuPart GetMenuPartByScreenCoordinate(SubmenuView* source, | 752 MenuPart GetMenuPartByScreenCoordinate(SubmenuView* source, |
| 753 int source_x, | 753 int source_x, |
| 754 int source_y); | 754 int source_y); |
| 755 | 755 |
| 756 // Implementation of GetMenuPartByScreenCoordinate for a single menu. Returns | 756 // Implementation of GetMenuPartByScreenCoordinate for a single menu. Returns |
| 757 // true if the supplied SubmenuView contains the location in terms of the | 757 // true if the supplied SubmenuView contains the location in terms of the |
| 758 // screen. If it does, part is set appropriately and true is returned. | 758 // screen. If it does, part is set appropriately and true is returned. |
| 759 bool GetMenuPartByScreenCoordinateImpl(SubmenuView* menu, | 759 bool GetMenuPartByScreenCoordinateImpl(SubmenuView* menu, |
| 760 const CPoint& screen_loc, | 760 const gfx::Point& screen_loc, |
| 761 MenuPart* part); | 761 MenuPart* part); |
| 762 | 762 |
| 763 // Returns true if the SubmenuView contains the specified location. This does | 763 // Returns true if the SubmenuView contains the specified location. This does |
| 764 // NOT included the scroll buttons, only the submenu view. | 764 // NOT included the scroll buttons, only the submenu view. |
| 765 bool DoesSubmenuContainLocation(SubmenuView* submenu, | 765 bool DoesSubmenuContainLocation(SubmenuView* submenu, |
| 766 const CPoint& screen_loc); | 766 const gfx::Point& screen_loc); |
| 767 | 767 |
| 768 // Opens/Closes the necessary menus such that state_ matches that of | 768 // Opens/Closes the necessary menus such that state_ matches that of |
| 769 // pending_state_. This is invoked if submenus are not opened immediately, | 769 // pending_state_. This is invoked if submenus are not opened immediately, |
| 770 // but after a delay. | 770 // but after a delay. |
| 771 void CommitPendingSelection(); | 771 void CommitPendingSelection(); |
| 772 | 772 |
| 773 // If item has a submenu, it is closed. This does NOT update the selection | 773 // If item has a submenu, it is closed. This does NOT update the selection |
| 774 // in anyway. | 774 // in anyway. |
| 775 void CloseMenu(MenuItemView* item); | 775 void CloseMenu(MenuItemView* item); |
| 776 | 776 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 // underway. | 935 // underway. |
| 936 scoped_ptr<MenuScrollTask> scroll_task_; | 936 scoped_ptr<MenuScrollTask> scroll_task_; |
| 937 | 937 |
| 938 DISALLOW_EVIL_CONSTRUCTORS(MenuController); | 938 DISALLOW_EVIL_CONSTRUCTORS(MenuController); |
| 939 }; | 939 }; |
| 940 | 940 |
| 941 } // namespace | 941 } // namespace |
| 942 | 942 |
| 943 #endif // CHROME_VIEWS_CHROME_MENU_H__ | 943 #endif // CHROME_VIEWS_CHROME_MENU_H__ |
| 944 | 944 |
| OLD | NEW |