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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // delegate can use this notification to show a warning to the user. | 137 // delegate can use this notification to show a warning to the user. |
138 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} | 138 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} |
139 | 139 |
140 // Notification that a previously unresponsive renderer has become | 140 // Notification that a previously unresponsive renderer has become |
141 // responsive again. The delegate can use this notification to end the | 141 // responsive again. The delegate can use this notification to end the |
142 // warning shown to the user. | 142 // warning shown to the user. |
143 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} | 143 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} |
144 | 144 |
145 // Requests to lock the mouse. Once the request is approved or rejected, | 145 // Requests to lock the mouse. Once the request is approved or rejected, |
146 // GotResponseToLockMouseRequest() will be called on the requesting render | 146 // GotResponseToLockMouseRequest() will be called on the requesting render |
147 // widget host. | 147 // widget host. |privileged| means that the request is always granted, used |
| 148 // for Pepper Flash. |
148 virtual void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, | 149 virtual void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, |
149 bool user_gesture, | 150 bool user_gesture, |
150 bool last_unlocked_by_target) {} | 151 bool last_unlocked_by_target, |
| 152 bool privileged) {} |
151 | 153 |
152 // Return the rect where to display the resize corner, if any, otherwise | 154 // Return the rect where to display the resize corner, if any, otherwise |
153 // an empty rect. | 155 // an empty rect. |
154 virtual gfx::Rect GetRootWindowResizerRect( | 156 virtual gfx::Rect GetRootWindowResizerRect( |
155 RenderWidgetHostImpl* render_widget_host) const; | 157 RenderWidgetHostImpl* render_widget_host) const; |
156 | 158 |
157 // Returns whether the associated tab is in fullscreen mode. | 159 // Returns whether the associated tab is in fullscreen mode. |
158 virtual bool IsFullscreenForCurrentTab() const; | 160 virtual bool IsFullscreenForCurrentTab() const; |
159 | 161 |
160 // Returns the display mode for the view. | 162 // Returns the display mode for the view. |
161 virtual blink::WebDisplayMode GetDisplayMode( | 163 virtual blink::WebDisplayMode GetDisplayMode( |
162 RenderWidgetHostImpl* render_widget_host) const; | 164 RenderWidgetHostImpl* render_widget_host) const; |
163 | 165 |
164 // Notification that the widget has lost capture. | 166 // Notification that the widget has lost capture. |
165 virtual void LostCapture(RenderWidgetHostImpl* render_widget_host) {} | 167 virtual void LostCapture(RenderWidgetHostImpl* render_widget_host) {} |
166 | 168 |
167 // Notification that the widget has lost the mouse lock. | 169 // Notification that the widget has lost the mouse lock. |
168 virtual void LostMouseLock(RenderWidgetHostImpl* render_widget_host) {} | 170 virtual void LostMouseLock(RenderWidgetHostImpl* render_widget_host) {} |
169 | 171 |
| 172 // Returns true if |render_widget_host| holds the mouse lock. |
| 173 virtual bool HasMouseLock(RenderWidgetHostImpl* render_widget_host); |
| 174 |
170 // Called when the widget has sent a compositor proto. This is used in Btlimp | 175 // Called when the widget has sent a compositor proto. This is used in Btlimp |
171 // mode with the RemoteChannel compositor. | 176 // mode with the RemoteChannel compositor. |
172 virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, | 177 virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, |
173 const std::vector<uint8_t>& proto) {} | 178 const std::vector<uint8_t>& proto) {} |
174 | 179 |
175 // Called when the visibility of the RenderFrameProxyHost in outter | 180 // Called when the visibility of the RenderFrameProxyHost in outter |
176 // WebContents changes. This method is only called on an inner WebContents and | 181 // WebContents changes. This method is only called on an inner WebContents and |
177 // will eventually notify all the RenderWidgetHostViews belonging to that | 182 // will eventually notify all the RenderWidgetHostViews belonging to that |
178 // WebContents. | 183 // WebContents. |
179 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} | 184 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} |
180 | 185 |
181 // Update the renderer's cache of the screen rect of the view and window. | 186 // Update the renderer's cache of the screen rect of the view and window. |
182 virtual void SendScreenRects() {} | 187 virtual void SendScreenRects() {} |
183 | 188 |
184 // Notifies that the main frame in the renderer has performed the first paint | 189 // Notifies that the main frame in the renderer has performed the first paint |
185 // after a navigation. | 190 // after a navigation. |
186 virtual void OnFirstPaintAfterLoad(RenderWidgetHostImpl* render_widget_host) { | 191 virtual void OnFirstPaintAfterLoad(RenderWidgetHostImpl* render_widget_host) { |
187 } | 192 } |
188 | 193 |
189 // Returns the TextInputManager tracking text input state. | 194 // Returns the TextInputManager tracking text input state. |
190 virtual TextInputManager* GetTextInputManager(); | 195 virtual TextInputManager* GetTextInputManager(); |
191 | 196 |
192 protected: | 197 protected: |
193 virtual ~RenderWidgetHostDelegate() {} | 198 virtual ~RenderWidgetHostDelegate() {} |
194 }; | 199 }; |
195 | 200 |
196 } // namespace content | 201 } // namespace content |
197 | 202 |
198 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 203 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
OLD | NEW |