Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: views/controls/menu/chrome_menu.h

Issue 160458: Fixes possible crash in bookmark menus. Specifically if you had a menu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/bookmark_bar_view_test.cc ('k') | views/controls/menu/chrome_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/chrome_menu.h
===================================================================
--- views/controls/menu/chrome_menu.h (revision 22055)
+++ views/controls/menu/chrome_menu.h (working copy)
@@ -714,7 +714,7 @@
SCROLL_DOWN
};
- MenuPart() : type(NONE), menu(NULL), submenu(NULL) {}
+ MenuPart() : type(NONE), menu(NULL), parent(NULL), submenu(NULL) {}
// Convenience for testing type == SCROLL_DOWN or type == SCROLL_UP.
bool is_scroll() const { return type == SCROLL_DOWN || type == SCROLL_UP; }
@@ -726,9 +726,14 @@
// this is NULL.
// NOTE: if type is MENU_ITEM and the mouse is not over a valid menu item
// but is over a menu (for example, the mouse is over a separator or
- // empty menu), this is NULL.
+ // empty menu), this is NULL and parent is the menu the mouse was
+ // clicked on.
MenuItemView* menu;
+ // If type is MENU_ITEM but the mouse is not over a menu item this is the
+ // parent of the menu item the user clicked on. Otherwise this is NULL.
+ MenuItemView* parent;
+
// If type is SCROLL_*, this is the submenu the mouse is over.
SubmenuView* submenu;
};
« no previous file with comments | « chrome/browser/views/bookmark_bar_view_test.cc ('k') | views/controls/menu/chrome_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698