Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1369)

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1394383002: OOPIF: Send page-level focus messages to all processes rendering a page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index c89bba6c56f4cf3c9c60626f85bef724b0c5b06e..c835063e3b730f3d2ddd30d9d4990de63d9dcd8c 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -705,6 +705,11 @@ void RenderWidgetHostImpl::Focus() {
is_focused_ = true;
Send(new InputMsg_SetFocus(routing_id_, true));
+
+ // Also send page-level focus state to other SiteInstances involved in
+ // rendering the current FrameTree.
+ if (IsRenderView() && delegate_)
+ delegate_->ReplicatePageFocus(true);
}
void RenderWidgetHostImpl::Blur() {
@@ -720,6 +725,11 @@ void RenderWidgetHostImpl::Blur() {
touch_emulator_->CancelTouch();
Send(new InputMsg_SetFocus(routing_id_, false));
+
+ // Also send page-level focus state to other SiteInstances involved in
+ // rendering the current FrameTree.
+ if (IsRenderView() && delegate_)
+ delegate_->ReplicatePageFocus(false);
}
void RenderWidgetHostImpl::LostCapture() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698