Chromium Code Reviews| Index: content/renderer/render_view_impl.h |
| diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h |
| index 468c268f60e8b0d308f06e551c68259f67180087..5b924ce05b88346060ebdd9b49f75292c0e3cc52 100644 |
| --- a/content/renderer/render_view_impl.h |
| +++ b/content/renderer/render_view_impl.h |
| @@ -182,6 +182,38 @@ class WebMediaPlayerProxyImplAndroid; |
| // scoped_refptr<int>. |
| typedef base::RefCountedData<int> SharedRenderViewCounter; |
| +// Container for all parameters passed to RenderViewImpl's constructor. |
| +struct RenderViewImplParams { |
|
jam
2012/11/08 20:37:06
nit: please move this to content/renderer/render_v
|
| + RenderViewImplParams(int32 opener_id, |
| + const RendererPreferences& renderer_prefs, |
| + const webkit_glue::WebPreferences& webkit_prefs, |
| + SharedRenderViewCounter* counter, |
| + int32 routing_id, |
| + int32 surface_id, |
| + int64 session_storage_namespace_id, |
| + const string16& frame_name, |
| + bool is_renderer_created, |
| + bool swapped_out, |
| + int32 next_page_id, |
| + const WebKit::WebScreenInfo& screen_info, |
| + AccessibilityMode accessibility_mode); |
| + ~RenderViewImplParams(); |
| + |
| + int32 opener_id; |
| + const RendererPreferences& renderer_prefs; |
| + const webkit_glue::WebPreferences& webkit_prefs; |
| + SharedRenderViewCounter* counter; |
| + int32 routing_id; |
| + int32 surface_id; |
| + int64 session_storage_namespace_id; |
| + const string16& frame_name; |
| + bool is_renderer_created; |
| + bool swapped_out; |
| + int32 next_page_id; |
| + const WebKit::WebScreenInfo& screen_info; |
| + AccessibilityMode accessibility_mode; |
| +}; |
| + |
| // |
| // RenderView is an object that manages a WebView object, and provides a |
| // communication interface with an embedding application process |
| @@ -215,6 +247,11 @@ class RenderViewImpl : public RenderWidget, |
| const WebKit::WebScreenInfo& screen_info, |
| AccessibilityMode accessibility_mode); |
| + // Used by content_layouttest_support to hook into the creation of |
| + // RenderViewImpls. |
| + static void InstallCreateHook( |
| + RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
| + |
| // Returns the RenderViewImpl containing the given WebView. |
| CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| @@ -767,6 +804,12 @@ class RenderViewImpl : public RenderWidget, |
| virtual bool CanComposeInline() OVERRIDE; |
| virtual bool WebWidgetHandlesCompositorScheduling() const OVERRIDE; |
| + protected: |
| + RenderViewImpl(RenderViewImplParams* params); |
| + |
| + // Do not delete directly. This class is reference counted. |
| + virtual ~RenderViewImpl(); |
| + |
| private: |
| // For unit tests. |
| friend class ExternalPopupMenuTest; |
| @@ -814,23 +857,6 @@ class RenderViewImpl : public RenderWidget, |
| CONNECTION_ERROR, |
| }; |
| - RenderViewImpl(int32 opener_id, |
| - const RendererPreferences& renderer_prefs, |
| - const webkit_glue::WebPreferences& webkit_prefs, |
| - SharedRenderViewCounter* counter, |
| - int32 routing_id, |
| - int32 surface_id, |
| - int64 session_storage_namespace_id, |
| - const string16& frame_name, |
| - bool is_renderer_created, |
| - bool swapped_out, |
| - int32 next_page_id, |
| - const WebKit::WebScreenInfo& screen_info, |
| - AccessibilityMode accessibility_mode); |
| - |
| - // Do not delete directly. This class is reference counted. |
| - virtual ~RenderViewImpl(); |
| - |
| void UpdateURL(WebKit::WebFrame* frame); |
| void UpdateTitle(WebKit::WebFrame* frame, const string16& title, |
| WebKit::WebTextDirection title_direction); |