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 13 matching lines...) Expand all Loading... | |
| 24 class Point; | 24 class Point; |
| 25 class Rect; | 25 class Rect; |
| 26 class Size; | 26 class Size; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 | 30 |
| 31 class BrowserAccessibilityManager; | 31 class BrowserAccessibilityManager; |
| 32 class RenderWidgetHostImpl; | 32 class RenderWidgetHostImpl; |
| 33 class RenderWidgetHostInputEventRouter; | 33 class RenderWidgetHostInputEventRouter; |
| 34 class RenderWidgetHostViewBase; | |
| 34 struct NativeWebKeyboardEvent; | 35 struct NativeWebKeyboardEvent; |
| 35 | 36 |
| 36 // | 37 // |
| 37 // RenderWidgetHostDelegate | 38 // RenderWidgetHostDelegate |
| 38 // | 39 // |
| 39 // An interface implemented by an object interested in knowing about the state | 40 // An interface implemented by an object interested in knowing about the state |
| 40 // of the RenderWidgetHost. | 41 // of the RenderWidgetHost. |
| 41 class CONTENT_EXPORT RenderWidgetHostDelegate { | 42 class CONTENT_EXPORT RenderWidgetHostDelegate { |
| 42 public: | 43 public: |
| 43 // The RenderWidgetHost has just been created. | 44 // The RenderWidgetHost has just been created. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 // RenderWidgetHost to this function to determine who should ultimately | 127 // RenderWidgetHost to this function to determine who should ultimately |
| 127 // consume the event. This facilitates keyboard event routing with | 128 // consume the event. This facilitates keyboard event routing with |
| 128 // out-of-process iframes, where multiple RenderWidgetHosts may be involved | 129 // out-of-process iframes, where multiple RenderWidgetHosts may be involved |
| 129 // in rendering a page, yet keyboard events all arrive at the main frame's | 130 // in rendering a page, yet keyboard events all arrive at the main frame's |
| 130 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in, | 131 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in, |
| 131 // the function returns the focused frame that should consume keyboard | 132 // the function returns the focused frame that should consume keyboard |
| 132 // events. In all other cases, the function returns back |receiving_widget|. | 133 // events. In all other cases, the function returns back |receiving_widget|. |
| 133 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost( | 134 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost( |
| 134 RenderWidgetHostImpl* receiving_widget); | 135 RenderWidgetHostImpl* receiving_widget); |
| 135 | 136 |
| 137 // Get the focused RenderWidgetHostView. | |
| 138 virtual RenderWidgetHostViewBase* GetFocusedView(); | |
| 139 | |
| 136 // Notification that the renderer has become unresponsive. The | 140 // Notification that the renderer has become unresponsive. The |
| 137 // delegate can use this notification to show a warning to the user. | 141 // delegate can use this notification to show a warning to the user. |
| 138 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} | 142 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} |
| 139 | 143 |
| 140 // Notification that a previously unresponsive renderer has become | 144 // Notification that a previously unresponsive renderer has become |
| 141 // responsive again. The delegate can use this notification to end the | 145 // responsive again. The delegate can use this notification to end the |
| 142 // warning shown to the user. | 146 // warning shown to the user. |
| 143 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} | 147 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} |
| 144 | 148 |
| 145 // Requests to lock the mouse. Once the request is approved or rejected, | 149 // Requests to lock the mouse. Once the request is approved or rejected, |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 165 // Notification that the widget has lost capture. | 169 // Notification that the widget has lost capture. |
| 166 virtual void LostCapture(RenderWidgetHostImpl* render_widget_host) {} | 170 virtual void LostCapture(RenderWidgetHostImpl* render_widget_host) {} |
| 167 | 171 |
| 168 // Notification that the widget has lost the mouse lock. | 172 // Notification that the widget has lost the mouse lock. |
| 169 virtual void LostMouseLock(RenderWidgetHostImpl* render_widget_host) {} | 173 virtual void LostMouseLock(RenderWidgetHostImpl* render_widget_host) {} |
| 170 | 174 |
| 171 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
| 172 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 176 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
| 173 #endif | 177 #endif |
| 174 | 178 |
| 175 // Called when the widget has sent a compositor proto. This is used in Btlimp | 179 // Called when the widget has sent a compositor proto. This is used in Btlimp |
|
Charlie Reis
2016/03/09 00:09:33
I noticed the "Btlimp" typo here from an earlier p
EhsanK
2016/03/14 19:58:08
Oops. Sorry. Thanks pointing this out! Done.
| |
| 176 // mode with the RemoteChannel compositor. | 180 // mode with the RemoteChannel compositor. |
| 177 virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, | 181 virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, |
| 178 const std::vector<uint8_t>& proto) {} | 182 const std::vector<uint8_t>& proto) {} |
| 179 | 183 |
| 180 // Called when the visibility of the RenderFrameProxyHost in outter | 184 // Called when the visibility of the RenderFrameProxyHost in outter |
|
Charlie Reis
2016/03/09 00:09:33
nit: Same here, with "outter"
EhsanK
2016/03/14 19:58:08
Done.
| |
| 181 // WebContents changes. This method is only called on an inner WebContents and | 185 // WebContents changes. This method is only called on an inner WebContents and |
| 182 // will eventually notify all the RenderWidgetHostViews belonging to that | 186 // will eventually notify all the RenderWidgetHostViews belonging to that |
| 183 // WebContents. | 187 // WebContents. |
| 184 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} | 188 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} |
| 185 | 189 |
| 186 // Update the renderer's cache of the screen rect of the view and window. | 190 // Update the renderer's cache of the screen rect of the view and window. |
| 187 virtual void SendScreenRects() {} | 191 virtual void SendScreenRects() {} |
| 188 | 192 |
| 189 protected: | 193 protected: |
| 190 virtual ~RenderWidgetHostDelegate() {} | 194 virtual ~RenderWidgetHostDelegate() {} |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 } // namespace content | 197 } // namespace content |
| 194 | 198 |
| 195 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 199 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
| OLD | NEW |