fix: read ignoreMenuShortcuts per WebContents (#14538)

This commit is contained in:
Cheng Zhao 2018-09-11 16:52:04 +09:00 committed by Samuel Attard
parent 1b920c25af
commit 8950caaa85
4 changed files with 21 additions and 16 deletions

View file

@ -1396,7 +1396,9 @@ void WebContents::UnregisterServiceWorker(
}
void WebContents::SetIgnoreMenuShortcuts(bool ignore) {
set_ignore_menu_shortcuts(ignore);
auto* web_preferences = WebContentsPreferences::From(web_contents());
DCHECK(web_preferences);
web_preferences->dict()->SetBoolean("ignoreMenuShortcuts", ignore);
}
void WebContents::SetAudioMuted(bool muted) {