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

Side by Side Diff: content/browser/renderer_host/render_widget_host_delegate.h

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: Add fix for MacOS hang. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // RenderWidgetHost to this function to determine who should ultimately 138 // RenderWidgetHost to this function to determine who should ultimately
139 // consume the event. This facilitates keyboard event routing with 139 // consume the event. This facilitates keyboard event routing with
140 // out-of-process iframes, where multiple RenderWidgetHosts may be involved 140 // out-of-process iframes, where multiple RenderWidgetHosts may be involved
141 // in rendering a page, yet keyboard events all arrive at the main frame's 141 // in rendering a page, yet keyboard events all arrive at the main frame's
142 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in, 142 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in,
143 // the function returns the focused frame that should consume keyboard 143 // the function returns the focused frame that should consume keyboard
144 // events. In all other cases, the function returns back |receiving_widget|. 144 // events. In all other cases, the function returns back |receiving_widget|.
145 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost( 145 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
146 RenderWidgetHostImpl* receiving_widget); 146 RenderWidgetHostImpl* receiving_widget);
147 147
148 // Get the RenderWidgetHost that should receive page level focus events. This
149 // will be the widget that is rendering the main frame of the currently
150 // focused WebContents.
Charlie Reis 2016/11/16 20:28:23 I'm having trouble understanding this vs GetFocuse
avallee 2016/11/16 21:18:10 See the <webview> focus explainer for extra detail
Charlie Reis 2016/11/16 21:51:19 Ok. I think more of this needs to come across in
alexmos 2016/11/16 23:29:03 +1 to making all relevant comments emphasize that
Charlie Reis 2016/11/17 00:49:47 Looks like this was overlooked.
151 virtual RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus();
152
153 // In cases with multiple RenderWidgetHosts involved in rendering a page, only
154 // one widget should be focused and active. This ensures that
155 // |render_widget_host| is focused and that its owning WebContents is also
156 // focused.
157 virtual void EnsureOwningContentsIsFocused(
Charlie Reis 2016/11/16 20:28:23 We should try to be more direct in the name, since
avallee 2016/11/16 21:18:10 Good idea. Done.
158 RenderWidgetHostImpl* render_widget_host) {}
159
148 // Notification that the renderer has become unresponsive. The 160 // Notification that the renderer has become unresponsive. The
149 // delegate can use this notification to show a warning to the user. 161 // delegate can use this notification to show a warning to the user.
150 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, 162 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
151 RendererUnresponsiveType type) {} 163 RendererUnresponsiveType type) {}
152 164
153 // Notification that a previously unresponsive renderer has become 165 // Notification that a previously unresponsive renderer has become
154 // responsive again. The delegate can use this notification to end the 166 // responsive again. The delegate can use this notification to end the
155 // warning shown to the user. 167 // warning shown to the user.
156 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} 168 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {}
157 169
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Allow the delegate to handle the cursor update. Returns true if handled. 231 // Allow the delegate to handle the cursor update. Returns true if handled.
220 virtual bool OnUpdateDragCursor(); 232 virtual bool OnUpdateDragCursor();
221 233
222 protected: 234 protected:
223 virtual ~RenderWidgetHostDelegate() {} 235 virtual ~RenderWidgetHostDelegate() {}
224 }; 236 };
225 237
226 } // namespace content 238 } // namespace content
227 239
228 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 240 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698