views: Focus on web view when window is focused.

This commit is contained in:
Cheng Zhao 2014-08-07 16:04:14 +08:00
parent 5d5a3138bc
commit c2885f77c9

View file

@ -456,6 +456,9 @@ void NativeWindowViews::OnWidgetActivationChanged(
else
NotifyWindowBlur();
if (active && GetWebContents() && !IsDevToolsOpened())
GetWebContents()->Focus();
// Hide menu bar when window is blured.
if (!active && menu_bar_autohide_ && menu_bar_show_) {
SetMenuBarVisibility(false);