Add webContents.setIgnoreMenuShortcuts()
This allows you to disable application menu shortcut handling on a per web contents basis.
This commit is contained in:
parent
3abeb6e2bc
commit
f20f87829b
8 changed files with 60 additions and 18 deletions
|
@ -53,6 +53,10 @@ class CommonWebContentsDelegate
|
|||
|
||||
NativeWindow* owner_window() const { return owner_window_.get(); }
|
||||
|
||||
void set_ignore_menu_shortcuts(bool ignore) {
|
||||
ignore_menu_shortcuts_ = ignore;
|
||||
}
|
||||
|
||||
bool is_html_fullscreen() const { return html_fullscreen_; }
|
||||
|
||||
protected:
|
||||
|
@ -137,6 +141,8 @@ class CommonWebContentsDelegate
|
|||
// The window that this WebContents belongs to.
|
||||
base::WeakPtr<NativeWindow> owner_window_;
|
||||
|
||||
bool ignore_menu_shortcuts_;
|
||||
|
||||
// Whether window is fullscreened by HTML5 api.
|
||||
bool html_fullscreen_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue