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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: forgot rebase Created 4 years, 1 month 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/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 60e1a9321972cb7f4cffffd168903a00b8481746..f653cde28de33ed4ce6505165d0446cd15f40a97 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -643,6 +643,9 @@ class CONTENT_EXPORT WebContentsImpl
void ReplicatePageFocus(bool is_focused) override;
RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
RenderWidgetHostImpl* receiving_widget) override;
+ RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override;
+ void EnsureOwningContentsIsFocused(
+ RenderWidgetHostImpl* render_widget_host) override;
void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
RendererUnresponsiveType type) override;
void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override;
@@ -1006,6 +1009,13 @@ class CONTENT_EXPORT WebContentsImpl
// Returns the root of the WebContents tree.
WebContentsImpl* GetOutermostWebContents();
+ // Become the focused WebContentsImpl. This will activate this content's main
+ // frame RenderWidget and indirectly all its subframe widgets.
+ // GetFocusedRenderWidgetHost will search this WebContentsImpl for a focused
+ // RenderWidgetHost. The previously focused WebContentsImpl, if any, will have
+ // its RenderWidgetHosts deactivated.
+ void SetAsFocusedWebContentsIfNecessary();
+
// Navigation helpers --------------------------------------------------------
//
// These functions are helpers for Navigate() and DidNavigate().

Powered by Google App Engine
This is Rietveld 408576698