fix: read ignoreMenuShortcuts per WebContents

This commit is contained in:
Cheng Zhao 2018-09-10 19:06:16 +09:00
parent dcd580b6cf
commit 13334d023d
4 changed files with 22 additions and 16 deletions

View file

@ -1393,7 +1393,10 @@ 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->preference()->SetKey("ignoreMenuShortcuts",
base::Value(ignore));
}
void WebContents::SetAudioMuted(bool muted) {