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