| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // In cases with multiple RenderWidgetHosts involved in rendering a page, only |
| 145 // one widget should be focused and active. This ensures that |
| 146 // |render_widget_host| is focused and that its owning WebContents is also |
| 147 // focused. |
| 148 virtual void EnsureOwningContentsIsFocused( |
| 149 RenderWidgetHostImpl* render_widget_host) {} |
| 150 |
| 144 // Notification that the renderer has become unresponsive. The | 151 // Notification that the renderer has become unresponsive. The |
| 145 // delegate can use this notification to show a warning to the user. | 152 // delegate can use this notification to show a warning to the user. |
| 146 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, | 153 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, |
| 147 RendererUnresponsiveType type) {} | 154 RendererUnresponsiveType type) {} |
| 148 | 155 |
| 149 // Notification that a previously unresponsive renderer has become | 156 // Notification that a previously unresponsive renderer has become |
| 150 // responsive again. The delegate can use this notification to end the | 157 // responsive again. The delegate can use this notification to end the |
| 151 // warning shown to the user. | 158 // warning shown to the user. |
| 152 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} | 159 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} |
| 153 | 160 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // this RenderWidgetHost. | 211 // this RenderWidgetHost. |
| 205 virtual bool IsHidden(); | 212 virtual bool IsHidden(); |
| 206 | 213 |
| 207 protected: | 214 protected: |
| 208 virtual ~RenderWidgetHostDelegate() {} | 215 virtual ~RenderWidgetHostDelegate() {} |
| 209 }; | 216 }; |
| 210 | 217 |
| 211 } // namespace content | 218 } // namespace content |
| 212 | 219 |
| 213 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 220 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
| OLD | NEW |