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

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: Move ReplicatePageFocus to FrameTree 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 f11607f0a3c9761d925e4b4ed92f1c0ddce5bc74..98dacfeb77b0fcf8ec0487a51095a9e616833a36 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -704,6 +704,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() {
@@ -719,6 +724,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() {

Powered by Google App Engine
This is Rietveld 408576698