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 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ |
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "content/browser/frame_host/render_frame_host_factory.h" | 13 #include "content/browser/frame_host/render_frame_host_factory.h" |
12 | 14 |
13 namespace content { | 15 namespace content { |
14 | 16 |
15 // Manages creation of the RenderFrameHostImpls; when registered, all created | 17 // Manages creation of the RenderFrameHostImpls; when registered, all created |
16 // RenderFrameHostsImpls will be TestRenderFrameHosts. This | 18 // RenderFrameHostsImpls will be TestRenderFrameHosts. This |
17 // automatically registers itself when it goes in scope, and unregisters itself | 19 // automatically registers itself when it goes in scope, and unregisters itself |
18 // when it goes out of scope. Since you can't have more than one factory | 20 // when it goes out of scope. Since you can't have more than one factory |
19 // registered at a time, you can only have one of these objects at a time. | 21 // registered at a time, you can only have one of these objects at a time. |
20 class TestRenderFrameHostFactory : public RenderFrameHostFactory { | 22 class TestRenderFrameHostFactory : public RenderFrameHostFactory { |
21 public: | 23 public: |
22 TestRenderFrameHostFactory(); | 24 TestRenderFrameHostFactory(); |
23 ~TestRenderFrameHostFactory() override; | 25 ~TestRenderFrameHostFactory() override; |
24 | 26 |
25 protected: | 27 protected: |
26 // RenderFrameHostFactory implementation. | 28 // RenderFrameHostFactory implementation. |
27 scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost( | 29 scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost( |
28 SiteInstance* site_instance, | 30 SiteInstance* site_instance, |
29 RenderViewHostImpl* render_view_host, | 31 RenderViewHostImpl* render_view_host, |
30 RenderFrameHostDelegate* delegate, | 32 RenderFrameHostDelegate* delegate, |
31 RenderWidgetHostDelegate* rwh_delegate, | 33 RenderWidgetHostDelegate* rwh_delegate, |
32 FrameTree* frame_tree, | 34 FrameTree* frame_tree, |
33 FrameTreeNode* frame_tree_node, | 35 FrameTreeNode* frame_tree_node, |
34 int32 routing_id, | 36 int32_t routing_id, |
35 int32 widget_routing_id, | 37 int32_t widget_routing_id, |
36 int flags) override; | 38 int flags) override; |
37 | 39 |
38 private: | 40 private: |
39 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHostFactory); | 41 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHostFactory); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace content | 44 } // namespace content |
43 | 45 |
44 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ | 46 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_FACTORY_H_ |
OLD | NEW |