Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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. | |
| 151 virtual RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus(); | |
|
Charlie Reis
2016/11/17 00:49:48
I think you missed my request to group these in a
avallee
2016/11/17 02:37:49
Sorry, missed that.
Done.
| |
| 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 // the focused WebContents. | |
| 157 virtual void FocusOwningWebContents( | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |