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
3 // found in the LICENSE file.
5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/frame_host/render_frame_host_factory.h"
16 class RenderFrameHostImpl
;
17 class RenderViewHostImpl
;
19 // Manages creation of the RenderFrameHostImpls; when registered, all created
20 // RenderFrameHostsImpls will be TestRenderFrameHosts. This
21 // automatically registers itself when it goes in scope, and unregisters itself
22 // when it goes out of scope. Since you can't have more than one factory
23 // registered at a time, you can only have one of these objects at a time.
24 class TestRenderFrameHostFactory
: public RenderFrameHostFactory
{
26 TestRenderFrameHostFactory();
27 virtual ~TestRenderFrameHostFactory();
30 // RenderFrameHostFactory implementation.
31 virtual scoped_ptr
<RenderFrameHostImpl
> CreateRenderFrameHost(
32 RenderViewHostImpl
* render_view_host
,
33 FrameTree
* frame_tree
,
35 bool is_swapped_out
) OVERRIDE
;
38 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHostFactory
);
41 } // namespace content
43 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_