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

Unified Diff: content/browser/renderer_host/render_widget_host_delegate.h

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: Fix creis comments. 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/renderer_host/render_widget_host_delegate.h
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index 46129fdd012affd19c87fbf2b028bc03bc6fb141..80fbea2d0d76ebc7005c1eee90b9854ac2b4c88a 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -219,6 +219,23 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
// Allow the delegate to handle the cursor update. Returns true if handled.
virtual bool OnUpdateDragCursor();
+ // Inner WebContents Helpers -------------------------------------------------
+ //
+ // These functions are helpers in managing a hierharchy of WebContents
+ // involved in rendering inner WebContents.
+
+ // Get the RenderWidgetHost that should receive page level focus events. This
+ // will be the widget that is rendering the main frame of the currently
+ // focused WebContents.
+ virtual RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus();
+
+ // In cases with multiple RenderWidgetHosts involved in rendering a page, only
+ // one widget should be focused and active. This ensures that
+ // |render_widget_host| is focused and that its owning WebContents is also
+ // the focused WebContents.
+ virtual void FocusOwningWebContents(
+ RenderWidgetHostImpl* render_widget_host) {}
+
protected:
virtual ~RenderWidgetHostDelegate() {}
};
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/renderer_host/render_widget_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698