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

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

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: Address comments from alexmos and lfg. 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // RenderWidgetHost to this function to determine who should ultimately 134 // RenderWidgetHost to this function to determine who should ultimately
135 // consume the event. This facilitates keyboard event routing with 135 // consume the event. This facilitates keyboard event routing with
136 // out-of-process iframes, where multiple RenderWidgetHosts may be involved 136 // out-of-process iframes, where multiple RenderWidgetHosts may be involved
137 // in rendering a page, yet keyboard events all arrive at the main frame's 137 // in rendering a page, yet keyboard events all arrive at the main frame's
138 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in, 138 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in,
139 // the function returns the focused frame that should consume keyboard 139 // the function returns the focused frame that should consume keyboard
140 // events. In all other cases, the function returns back |receiving_widget|. 140 // events. In all other cases, the function returns back |receiving_widget|.
141 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost( 141 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
142 RenderWidgetHostImpl* receiving_widget); 142 RenderWidgetHostImpl* receiving_widget);
143 143
144 // Get the RenderWidgetHost that should receive page level focus events. This
145 // will be the widget that is rendering the main frame of the currently
146 // focused WebContents.
147 virtual RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus();
148
149 // In cases with multiple RenderWidgetHosts involved in rendering a page, only
150 // one widget should be focused and active. This ensures that
151 // |render_widget_host| is focused and that its owning WebContents is also
152 // focused.
153 virtual void EnsureOwningContentsIsFocused(
154 RenderWidgetHostImpl* render_widget_host) {}
155
144 // Notification that the renderer has become unresponsive. The 156 // Notification that the renderer has become unresponsive. The
145 // delegate can use this notification to show a warning to the user. 157 // delegate can use this notification to show a warning to the user.
146 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, 158 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
147 RendererUnresponsiveType type) {} 159 RendererUnresponsiveType type) {}
148 160
149 // Notification that a previously unresponsive renderer has become 161 // Notification that a previously unresponsive renderer has become
150 // responsive again. The delegate can use this notification to end the 162 // responsive again. The delegate can use this notification to end the
151 // warning shown to the user. 163 // warning shown to the user.
152 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} 164 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {}
153 165
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // this RenderWidgetHost. 216 // this RenderWidgetHost.
205 virtual bool IsHidden(); 217 virtual bool IsHidden();
206 218
207 protected: 219 protected:
208 virtual ~RenderWidgetHostDelegate() {} 220 virtual ~RenderWidgetHostDelegate() {}
209 }; 221 };
210 222
211 } // namespace content 223 } // namespace content
212 224
213 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 225 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698