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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 virtual RenderProcessHost* GetProcess() const = 0; | 217 virtual RenderProcessHost* GetProcess() const = 0; |
218 | 218 |
219 virtual int GetRoutingID() const = 0; | 219 virtual int GetRoutingID() const = 0; |
220 | 220 |
221 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the | 221 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the |
222 // RenderWidget is being destroyed or the render process crashed. You should | 222 // RenderWidget is being destroyed or the render process crashed. You should |
223 // never cache this pointer since it can become NULL if the renderer crashes, | 223 // never cache this pointer since it can become NULL if the renderer crashes, |
224 // instead you should always ask for it using the accessor. | 224 // instead you should always ask for it using the accessor. |
225 virtual RenderWidgetHostView* GetView() const = 0; | 225 virtual RenderWidgetHostView* GetView() const = 0; |
226 | 226 |
| 227 // Returns true if the renderer is loading, false if not. |
| 228 virtual bool IsLoading() const = 0; |
| 229 |
227 // Returns true if this is a RenderViewHost, false if not. | 230 // Returns true if this is a RenderViewHost, false if not. |
228 virtual bool IsRenderView() const = 0; | 231 virtual bool IsRenderView() const = 0; |
229 | 232 |
230 // This tells the renderer to paint into a bitmap and return it, | 233 // This tells the renderer to paint into a bitmap and return it, |
231 // regardless of whether the tab is hidden or not. It resizes the | 234 // regardless of whether the tab is hidden or not. It resizes the |
232 // web widget to match the |page_size| and then returns the bitmap | 235 // web widget to match the |page_size| and then returns the bitmap |
233 // scaled so it matches the |desired_size|, so that the scaling | 236 // scaled so it matches the |desired_size|, so that the scaling |
234 // happens on the rendering thread. When the bitmap is ready, the | 237 // happens on the rendering thread. When the bitmap is ready, the |
235 // renderer sends a PaintAtSizeACK to this host, and a | 238 // renderer sends a PaintAtSizeACK to this host, and a |
236 // RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK notification is issued. | 239 // RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK notification is issued. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 // within content/. This method is necessary because | 285 // within content/. This method is necessary because |
283 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 286 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
284 // subclasses inherit it virtually, which removes our ability to | 287 // subclasses inherit it virtually, which removes our ability to |
285 // static_cast to the subclass. | 288 // static_cast to the subclass. |
286 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 289 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
287 }; | 290 }; |
288 | 291 |
289 } // namespace content | 292 } // namespace content |
290 | 293 |
291 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 294 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |