| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_host_factory.h" | 5 #include "content/test/test_render_frame_host_factory.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/browser/frame_host/test_render_frame_host.h" | 10 #include "content/browser/frame_host/test_render_frame_host.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 TestRenderFrameHostFactory::TestRenderFrameHostFactory() { | 14 TestRenderFrameHostFactory::TestRenderFrameHostFactory() { |
| 15 RenderFrameHostFactory::RegisterFactory(this); | 15 RenderFrameHostFactory::RegisterFactory(this); |
| 16 } | 16 } |
| 17 | 17 |
| 18 TestRenderFrameHostFactory::~TestRenderFrameHostFactory() { | 18 TestRenderFrameHostFactory::~TestRenderFrameHostFactory() { |
| 19 RenderFrameHostFactory::UnregisterFactory(); | 19 RenderFrameHostFactory::UnregisterFactory(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 scoped_ptr<RenderFrameHostImpl> | 22 scoped_ptr<RenderFrameHostImpl> |
| 23 TestRenderFrameHostFactory::CreateRenderFrameHost( | 23 TestRenderFrameHostFactory::CreateRenderFrameHost( |
| 24 RenderViewHostImpl* render_view_host, | 24 RenderViewHostImpl* render_view_host, |
| 25 FrameTree* frame_tree, | 25 FrameTree* frame_tree, |
| 26 FrameTreeNode* frame_tree_node, |
| 26 int routing_id, | 27 int routing_id, |
| 27 bool is_swapped_out) { | 28 bool is_swapped_out) { |
| 28 return make_scoped_ptr( | 29 return make_scoped_ptr( |
| 29 new TestRenderFrameHost( | 30 new TestRenderFrameHost( |
| 30 render_view_host, frame_tree, routing_id, is_swapped_out)) | 31 render_view_host, frame_tree, frame_tree_node, routing_id, |
| 32 is_swapped_out)) |
| 31 .PassAs<RenderFrameHostImpl>(); | 33 .PassAs<RenderFrameHostImpl>(); |
| 32 } | 34 } |
| 33 | 35 |
| 34 } // namespace content | 36 } // namespace content |
| OLD | NEW |