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

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

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: Address comments from alexmos and lfg. Created 4 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/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 c9e3649b0621769ed721702b16df5913fc23d2ab..911cb1b3c33f74dcb1ad215c6b7ab73d99dd65d3 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -654,6 +654,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;
@@ -1017,6 +1020,11 @@ class CONTENT_EXPORT WebContentsImpl
// Returns the root of the WebContents tree.
WebContentsImpl* GetOutermostWebContents();
+ // Become the focused WebContentsImpl. This will activate this content's
+ // RenderWidget and direct keyboard input to it. The previously focused
alexmos 2016/10/31 18:57:57 Is it a bit ambiguous what "this content's RenderW
avallee 2016/11/07 19:18:44 Yes, focusing the Widget will call back into WebCo
+ // WebContentsImpl, if any, will have its RenderWidget deactivated.
+ void ChangeFocusIfNecessary();
alexmos 2016/10/31 18:57:57 Perhaps something like SetAsFocusedWebContentsIfNe
avallee 2016/11/07 19:18:44 Good idea. Done.
+
// Navigation helpers --------------------------------------------------------
//
// These functions are helpers for Navigate() and DidNavigate().

Powered by Google App Engine
This is Rietveld 408576698