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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 delete_counter_(NULL), | 250 delete_counter_(NULL), |
251 simulate_fetch_via_proxy_(false), | 251 simulate_fetch_via_proxy_(false), |
252 simulate_history_list_was_cleared_(false), | 252 simulate_history_list_was_cleared_(false), |
253 contents_mime_type_("text/html"), | 253 contents_mime_type_("text/html"), |
254 opener_route_id_(MSG_ROUTING_NONE), | 254 opener_route_id_(MSG_ROUTING_NONE), |
255 main_render_frame_host_(NULL) { | 255 main_render_frame_host_(NULL) { |
256 // TestRenderWidgetHostView installs itself into this->view_ in its | 256 // TestRenderWidgetHostView installs itself into this->view_ in its |
257 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is | 257 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is |
258 // called. | 258 // called. |
259 new TestRenderWidgetHostView(this); | 259 new TestRenderWidgetHostView(this); |
260 | |
261 main_frame_id_ = kFrameId; | |
262 } | 260 } |
263 | 261 |
264 TestRenderViewHost::~TestRenderViewHost() { | 262 TestRenderViewHost::~TestRenderViewHost() { |
265 if (delete_counter_) | 263 if (delete_counter_) |
266 ++*delete_counter_; | 264 ++*delete_counter_; |
267 } | 265 } |
268 | 266 |
269 bool TestRenderViewHost::CreateRenderView( | 267 bool TestRenderViewHost::CreateRenderView( |
270 const base::string16& frame_name, | 268 const base::string16& frame_name, |
271 int opener_route_id, | 269 int opener_route_id, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 432 |
435 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 433 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
436 return static_cast<TestRenderFrameHost*>(main_rfh()); | 434 return static_cast<TestRenderFrameHost*>(main_rfh()); |
437 } | 435 } |
438 | 436 |
439 TestWebContents* RenderViewHostImplTestHarness::contents() { | 437 TestWebContents* RenderViewHostImplTestHarness::contents() { |
440 return static_cast<TestWebContents*>(web_contents()); | 438 return static_cast<TestWebContents*>(web_contents()); |
441 } | 439 } |
442 | 440 |
443 } // namespace content | 441 } // namespace content |
OLD | NEW |