mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add cleanup when context menu isn't running (fixes #3711)
The menu may not be running in the following cases: - If the menu is empty (e.g. cleared in OnBeforeContextMenu). - If the menu is disabled (see e.g. RenderViewContextMenuViews::Show). - When the run call blocks until the menu is dismissed (macOS behavior). We explicitly clean up in these cases instead of waiting for OnMenuClosed which will otherwise never be called for the first 2 cases. Menu run status is exposed via new ContextMenuDelegate and RenderViewContextMenuBase methods.
This commit is contained in:
@@ -21,6 +21,8 @@ void RegisterCallbacks();
|
||||
bool HandleContextMenu(content::WebContents* opener,
|
||||
const content::ContextMenuParams& params);
|
||||
|
||||
void MaybeResetContextMenu(content::WebContents* opener);
|
||||
|
||||
} // namespace context_menu
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_CHROME_CHROME_CONTEXT_MENU_HANDLER_H_
|
||||
|
Reference in New Issue
Block a user