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

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

Issue 1463153002: Don't route a non-frame widget's keyboard event to main frame widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Charlie's comments Created 5 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a96428c7e17c92169b008823d697a51e563ad2f1..e415e2ce70d8b1817e5a616feff74041c56ca6f7 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -118,11 +118,17 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
// current FrameTree, not including the main frame's SiteInstance.
virtual void ReplicatePageFocus(bool is_focused) {}
- // Get the RenderWidgetHost of the currently focused frame. With
- // out-of-process iframes, multiple RenderWidgetHosts may be involved in
- // rendering a page, and this function determines which RenderWidgetHost
- // should consume a keyboard input event.
- virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost();
+ // Get the focused RenderWidgetHost associated with |receiving_widget|. A
+ // RenderWidgetHostView, upon receiving a keyboard event, will pass its
+ // RenderWidgetHost to this function to determine who should ultimately
+ // consume the event. This facilitates keyboard event routing with
+ // out-of-process iframes, where multiple RenderWidgetHosts may be involved
+ // in rendering a page, yet keyboard events all arrive at the main frame's
+ // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in,
+ // the function returns the focused frame that should consume keyboard
+ // events. In all other cases, the function returns back |receiving_widget|.
+ virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
+ RenderWidgetHostImpl* receiving_widget);
// Notification that the renderer has become unresponsive. The
// delegate can use this notification to show a warning to the user.
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698