Add AtomWindow.isWebViewFocused() API, fixes #57.
This commit is contained in:
parent
a33c068ed1
commit
a949e9542d
4 changed files with 14 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "content/public/browser/notification_types.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "common/api/api_messages.h"
|
||||
#include "common/options_switches.h"
|
||||
#include "ipc/ipc_message_macros.h"
|
||||
|
@ -153,6 +154,10 @@ void NativeWindow::BlurWebView() {
|
|||
GetWebContents()->GetRenderViewHost()->Blur();
|
||||
}
|
||||
|
||||
bool NativeWindow::IsWebViewFocused() {
|
||||
return GetWebContents()->GetRenderViewHost()->GetView()->HasFocus();
|
||||
}
|
||||
|
||||
void NativeWindow::RestartHangMonitorTimeout() {
|
||||
GetWebContents()->GetRenderViewHost()->RestartHangMonitorTimeout();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue