fix flash menu being unresponsive to commands

This commit is contained in:
Heilig Benedek 2017-11-27 00:24:25 +01:00 committed by Cheng Zhao
parent 85ef42d99e
commit c586806609
5 changed files with 19 additions and 3 deletions

View file

@ -653,8 +653,10 @@ void WebContents::RendererResponsive(content::WebContents* source) {
bool WebContents::HandleContextMenu(const content::ContextMenuParams& params) {
if (params.custom_context.is_pepper_menu) {
Emit("pepper-context-menu", std::make_pair(params, web_contents()));
web_contents()->NotifyContextMenuClosed(params.custom_context);
Emit("pepper-context-menu",
std::make_pair(params, web_contents()),
base::Bind(&content::WebContents::NotifyContextMenuClosed,
base::Unretained(web_contents()), params.custom_context));
} else {
Emit("context-menu", std::make_pair(params, web_contents()));
}