From 14c61a96af44a1f2dbf57635af58243f8819cb2c Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Mon, 21 Aug 2017 00:19:16 +0300 Subject: [PATCH] VR: Check focus state browser-side before sending input to renderer. https://chromium-review.googlesource.com/c/565760 --- brightray/browser/inspectable_web_contents_impl.cc | 3 ++- brightray/browser/inspectable_web_contents_impl.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 0a12eb4806..31e58ee7fc 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -737,7 +737,8 @@ void InspectableWebContentsImpl::EnumerateDirectory( delegate->EnumerateDirectory(source, request_id, path); } -void InspectableWebContentsImpl::OnWebContentsFocused() { +void InspectableWebContentsImpl::OnWebContentsFocused( + content::RenderWidgetHost* render_widget_host) { #if defined(TOOLKIT_VIEWS) if (view_->GetDelegate()) view_->GetDelegate()->DevToolsFocused(); diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index 2b514404cb..f80b0c5bad 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -127,7 +127,8 @@ class InspectableWebContentsImpl : void RenderFrameHostChanged(content::RenderFrameHost* old_host, content::RenderFrameHost* new_host) override; void WebContentsDestroyed() override; - void OnWebContentsFocused() override; + void OnWebContentsFocused( + content::RenderWidgetHost* render_widget_host) override; void DidStartNavigationToPendingEntry( const GURL& url, content::ReloadType reload_type) override;