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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 blink::WebPopupType popup_type, | 120 blink::WebPopupType popup_type, |
121 const blink::WebScreenInfo& screen_info); | 121 const blink::WebScreenInfo& screen_info); |
122 | 122 |
123 // Creates a new RenderWidget that will be attached to a RenderFrame. | 123 // Creates a new RenderWidget that will be attached to a RenderFrame. |
124 static RenderWidget* CreateForFrame(int routing_id, | 124 static RenderWidget* CreateForFrame(int routing_id, |
125 bool hidden, | 125 bool hidden, |
126 const blink::WebScreenInfo& screen_info, | 126 const blink::WebScreenInfo& screen_info, |
127 CompositorDependencies* compositor_deps, | 127 CompositorDependencies* compositor_deps, |
128 blink::WebLocalFrame* frame); | 128 blink::WebLocalFrame* frame); |
129 | 129 |
| 130 // Used by content_layouttest_support to hook into the creation of |
| 131 // RenderWidgets. |
| 132 using CreateRenderWidgetFunction = |
| 133 RenderWidget* (*)(CompositorDependencies*, |
| 134 blink::WebPopupType, |
| 135 const blink::WebScreenInfo&, |
| 136 bool, |
| 137 bool, |
| 138 bool); |
| 139 static void InstallCreateHook( |
| 140 CreateRenderWidgetFunction create_render_widget); |
| 141 |
130 // Closes a RenderWidget that was created by |CreateForFrame|. | 142 // Closes a RenderWidget that was created by |CreateForFrame|. |
131 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget. | 143 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget. |
132 // https://crbug.com/545684 | 144 // https://crbug.com/545684 |
133 virtual void CloseForFrame(); | 145 virtual void CloseForFrame(); |
134 | 146 |
135 int32_t routing_id() const { return routing_id_; } | 147 int32_t routing_id() const { return routing_id_; } |
136 void SetRoutingID(int32_t routing_id); | 148 void SetRoutingID(int32_t routing_id); |
137 | 149 |
138 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 150 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
139 blink::WebWidget* webwidget() const { return webwidget_; } | 151 blink::WebWidget* webwidget() const { return webwidget_; } |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 // This reference is set by the RenderFrame and is used to query the IME- | 804 // This reference is set by the RenderFrame and is used to query the IME- |
793 // related state from the plugin to later send to the browser. | 805 // related state from the plugin to later send to the browser. |
794 PepperPluginInstanceImpl* focused_pepper_plugin_; | 806 PepperPluginInstanceImpl* focused_pepper_plugin_; |
795 | 807 |
796 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 808 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
797 }; | 809 }; |
798 | 810 |
799 } // namespace content | 811 } // namespace content |
800 | 812 |
801 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 813 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |