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

Unified Diff: content/browser/web_contents/web_contents_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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a938e330d89984cf0a2911855a2209a2f6ea33ba..6b1407b78e0ace939218a24a5478b0c23d48f1c3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1580,6 +1580,16 @@ RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
return rwh_input_event_router_.get();
}
+void WebContentsImpl::ReplicatePageFocus(bool is_focused) {
+ // Focus loss may occur while this WebContents is being destroyed. Don't
+ // send the message in this case, as the main frame's RenderFrameHost and
+ // other state has already been cleared.
+ if (is_being_destroyed_)
+ return;
+
+ frame_tree_.ReplicatePageFocus(is_focused);
+}
+
void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
// This method is being called to enter renderer-initiated fullscreen mode.
// Make sure any existing fullscreen widget is shut down first.
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698