[Mac] Don't rebuild share menu every time a hotkey is pressed
Currently, the share menu controller's |menuNeedsUpdate:| is called every time a hotkey is pressed. Implementing |menuHasKeyEquivalent:forEvent:target:action:| disables that path in the menu code, so this change implements that. Similarly to the bookmark menu, we return NO unconditionally and let the hotkey be handled by the menu item. To ensure the menu item exists to handle it, we populate the menu on the first call to |menuHasKeyEquivalent:| unless it's already been populated. Bug: 787049 Change-Id: I321ed87dfc64f89f31c5738712472d33a923a55a Reviewed-on: https://chromium-review.googlesource.com/801854Reviewed-by:Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Leonard Grey <lgrey@chromium.org> Cr-Commit-Position: refs/heads/master@{#520933}
Showing
Please register or sign in to comment