cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / content / test / test_render_view_host_factory.h
blobcb6757bf41d7a66460d20bb49f4dcc443d448561
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/browser/renderer_host/render_view_host_factory.h"
12 namespace content {
14 class SiteInstance;
15 class RenderViewHostDelegate;
16 class RenderProcessHostFactory;
17 class SessionStorageNamespace;
19 // Manages creation of the RenderViewHosts using our special subclass. This
20 // automatically registers itself when it goes in scope, and unregisters itself
21 // when it goes out of scope. Since you can't have more than one factory
22 // registered at a time, you can only have one of these objects at a time.
23 class TestRenderViewHostFactory : public RenderViewHostFactory {
24 public:
25 explicit TestRenderViewHostFactory(RenderProcessHostFactory* rph_factory);
26 ~TestRenderViewHostFactory() override;
28 virtual void set_render_process_host_factory(
29 RenderProcessHostFactory* rph_factory);
30 RenderViewHost* CreateRenderViewHost(
31 SiteInstance* instance,
32 RenderViewHostDelegate* delegate,
33 RenderWidgetHostDelegate* widget_delegate,
34 int32 routing_id,
35 int32 surface_id,
36 int32 main_frame_routing_id,
37 bool swapped_out) override;
39 private:
40 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory);
43 } // namespace content
45 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_