| 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/loader/resource_dispatcher_host_impl.h" | 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is | 229 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is |
| 230 // called. | 230 // called. |
| 231 new TestRenderWidgetHostView(this); | 231 new TestRenderWidgetHostView(this); |
| 232 } | 232 } |
| 233 | 233 |
| 234 TestRenderViewHost::~TestRenderViewHost() { | 234 TestRenderViewHost::~TestRenderViewHost() { |
| 235 if (delete_counter_) | 235 if (delete_counter_) |
| 236 ++*delete_counter_; | 236 ++*delete_counter_; |
| 237 } | 237 } |
| 238 | 238 |
| 239 bool TestRenderViewHost::CreateTestRenderView( |
| 240 const base::string16& frame_name, |
| 241 int opener_route_id, |
| 242 int proxy_route_id, |
| 243 int32 max_page_id, |
| 244 bool window_was_created_with_opener) { |
| 245 return CreateRenderView(frame_name, opener_route_id, proxy_route_id, |
| 246 max_page_id, FrameReplicationState(), |
| 247 window_was_created_with_opener); |
| 248 } |
| 249 |
| 239 bool TestRenderViewHost::CreateRenderView( | 250 bool TestRenderViewHost::CreateRenderView( |
| 240 const base::string16& frame_name, | 251 const base::string16& frame_name, |
| 241 int opener_route_id, | 252 int opener_route_id, |
| 242 int proxy_route_id, | 253 int proxy_route_id, |
| 243 int32 max_page_id, | 254 int32 max_page_id, |
| 255 const FrameReplicationState& replicated_frame_state, |
| 244 bool window_was_created_with_opener) { | 256 bool window_was_created_with_opener) { |
| 245 DCHECK(!IsRenderViewLive()); | 257 DCHECK(!IsRenderViewLive()); |
| 246 set_renderer_initialized(true); | 258 set_renderer_initialized(true); |
| 247 DCHECK(IsRenderViewLive()); | 259 DCHECK(IsRenderViewLive()); |
| 248 opener_route_id_ = opener_route_id; | 260 opener_route_id_ = opener_route_id; |
| 249 RenderFrameHost* main_frame = GetMainFrame(); | 261 RenderFrameHost* main_frame = GetMainFrame(); |
| 250 if (main_frame) | 262 if (main_frame) |
| 251 static_cast<RenderFrameHostImpl*>(main_frame)->SetRenderFrameCreated(true); | 263 static_cast<RenderFrameHostImpl*>(main_frame)->SetRenderFrameCreated(true); |
| 252 | 264 |
| 253 return true; | 265 return true; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 329 |
| 318 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 330 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
| 319 return contents()->GetMainFrame(); | 331 return contents()->GetMainFrame(); |
| 320 } | 332 } |
| 321 | 333 |
| 322 TestWebContents* RenderViewHostImplTestHarness::contents() { | 334 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 323 return static_cast<TestWebContents*>(web_contents()); | 335 return static_cast<TestWebContents*>(web_contents()); |
| 324 } | 336 } |
| 325 | 337 |
| 326 } // namespace content | 338 } // namespace content |
| OLD | NEW |