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 #include "content/test/test_render_view_host.h" | 5 #include "content/test/test_render_view_host.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 gfx::NativeViewId TestRenderWidgetHostView::GetParentForWindowlessPlugin() | 229 gfx::NativeViewId TestRenderWidgetHostView::GetParentForWindowlessPlugin() |
230 const { | 230 const { |
231 return 0; | 231 return 0; |
232 } | 232 } |
233 #endif | 233 #endif |
234 | 234 |
235 TestRenderViewHost::TestRenderViewHost( | 235 TestRenderViewHost::TestRenderViewHost( |
236 SiteInstance* instance, | 236 SiteInstance* instance, |
237 RenderViewHostDelegate* delegate, | 237 RenderViewHostDelegate* delegate, |
238 RenderFrameHostDelegate* frame_delegate, | |
239 RenderWidgetHostDelegate* widget_delegate, | 238 RenderWidgetHostDelegate* widget_delegate, |
240 int routing_id, | 239 int routing_id, |
241 int main_frame_routing_id, | 240 int main_frame_routing_id, |
242 bool swapped_out) | 241 bool swapped_out) |
243 : RenderViewHostImpl(instance, | 242 : RenderViewHostImpl(instance, |
244 delegate, | 243 delegate, |
245 frame_delegate, | |
246 widget_delegate, | 244 widget_delegate, |
247 routing_id, | 245 routing_id, |
248 main_frame_routing_id, | 246 main_frame_routing_id, |
249 swapped_out, | 247 swapped_out, |
250 false /* hidden */), | 248 false /* hidden */), |
251 render_view_created_(false), | 249 render_view_created_(false), |
252 delete_counter_(NULL), | 250 delete_counter_(NULL), |
253 simulate_fetch_via_proxy_(false), | 251 simulate_fetch_via_proxy_(false), |
254 simulate_history_list_was_cleared_(false), | 252 simulate_history_list_was_cleared_(false), |
255 contents_mime_type_("text/html"), | 253 contents_mime_type_("text/html"), |
256 opener_route_id_(MSG_ROUTING_NONE) { | 254 opener_route_id_(MSG_ROUTING_NONE), |
| 255 main_render_frame_host_(NULL) { |
257 // TestRenderWidgetHostView installs itself into this->view_ in its | 256 // TestRenderWidgetHostView installs itself into this->view_ in its |
258 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is | 257 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is |
259 // called. | 258 // called. |
260 new TestRenderWidgetHostView(this); | 259 new TestRenderWidgetHostView(this); |
261 | 260 |
262 main_frame_id_ = kFrameId; | 261 main_frame_id_ = kFrameId; |
263 } | 262 } |
264 | 263 |
265 TestRenderViewHost::~TestRenderViewHost() { | 264 TestRenderViewHost::~TestRenderViewHost() { |
266 if (delete_counter_) | 265 if (delete_counter_) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 434 |
436 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 435 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
437 return static_cast<TestRenderFrameHost*>(main_rfh()); | 436 return static_cast<TestRenderFrameHost*>(main_rfh()); |
438 } | 437 } |
439 | 438 |
440 TestWebContents* RenderViewHostImplTestHarness::contents() { | 439 TestWebContents* RenderViewHostImplTestHarness::contents() { |
441 return static_cast<TestWebContents*>(web_contents()); | 440 return static_cast<TestWebContents*>(web_contents()); |
442 } | 441 } |
443 | 442 |
444 } // namespace content | 443 } // namespace content |
OLD | NEW |