summaryrefslogtreecommitdiffstats
path: root/ui/base/models/simple_menu_model.h
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 02:15:08 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 02:15:08 +0000
commit0be241219a6cecb753ae4fdfb049f75530353771 (patch)
tree74eef3fce4d24a8ab40724d1d5243482d07dfdbd /ui/base/models/simple_menu_model.h
parent244f2b3b9ff0cc85d5c94f33006c417fc8f3220e (diff)
downloadchromium_src-0be241219a6cecb753ae4fdfb049f75530353771.zip
chromium_src-0be241219a6cecb753ae4fdfb049f75530353771.tar.gz
chromium_src-0be241219a6cecb753ae4fdfb049f75530353771.tar.bz2
Don't send ViewMsg_ContextMenuClosed to the renderer process for submenus.
Note: currently SimpleMenuModel::Delegate doesn't receive the same notifications on all platforms. On Windows and CrOS, MenuWillShow and MenuClosed are sent for all menus (including submenus); while these notifications are not sent for submenus on Linux (haven't tested Mac). This CL makes sure that on Windows and CrOS no ViewMsg_ContextMenuClosed messages are generated for submenus, but it doesn't unify the behavior of SimpleMenuModel::Delegate. I have filed a bug (http://code.google.com/p/chromium/issues/detail?id=90732) to track that issue. BUG=None TEST= - make sure you are running Pepper Flash on either CrOS or Windows; - go to www.hulu.com; - open context menu on the flash content; - move the cursor onto the Quality item to open a submenu; - move the cursor away; - the renderer process shouldn't crash. Review URL: http://codereview.chromium.org/7492054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/models/simple_menu_model.h')
-rw-r--r--ui/base/models/simple_menu_model.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index de233fd..9f7136d 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -50,10 +50,10 @@ class UI_API SimpleMenuModel : public MenuModel {
virtual void ExecuteCommand(int command_id) = 0;
// Notifies the delegate that the menu is about to show.
- virtual void MenuWillShow();
+ virtual void MenuWillShow(SimpleMenuModel* source);
// Notifies the delegate that the menu has closed.
- virtual void MenuClosed();
+ virtual void MenuClosed(SimpleMenuModel* source);
protected:
virtual ~Delegate() {}