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 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ |
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ | 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "content/browser/renderer_host/render_view_host_factory.h" | 12 #include "content/browser/renderer_host/render_view_host_factory.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 class SiteInstance; | 16 class SiteInstance; |
17 class RenderViewHostDelegate; | 17 class RenderViewHostDelegate; |
18 class RenderProcessHostFactory; | 18 class RenderProcessHostFactory; |
19 class SessionStorageNamespace; | |
20 | 19 |
21 // Manages creation of the RenderViewHosts using our special subclass. This | 20 // Manages creation of the RenderViewHosts using our special subclass. This |
22 // automatically registers itself when it goes in scope, and unregisters itself | 21 // automatically registers itself when it goes in scope, and unregisters itself |
23 // when it goes out of scope. Since you can't have more than one factory | 22 // when it goes out of scope. Since you can't have more than one factory |
24 // registered at a time, you can only have one of these objects at a time. | 23 // registered at a time, you can only have one of these objects at a time. |
25 class TestRenderViewHostFactory : public RenderViewHostFactory { | 24 class TestRenderViewHostFactory : public RenderViewHostFactory { |
26 public: | 25 public: |
27 explicit TestRenderViewHostFactory(RenderProcessHostFactory* rph_factory); | 26 explicit TestRenderViewHostFactory(RenderProcessHostFactory* rph_factory); |
28 ~TestRenderViewHostFactory() override; | 27 ~TestRenderViewHostFactory() override; |
29 | 28 |
30 virtual void set_render_process_host_factory( | 29 virtual void set_render_process_host_factory( |
31 RenderProcessHostFactory* rph_factory); | 30 RenderProcessHostFactory* rph_factory); |
32 RenderViewHost* CreateRenderViewHost( | 31 RenderViewHost* CreateRenderViewHost( |
33 SiteInstance* instance, | 32 SiteInstance* instance, |
34 RenderViewHostDelegate* delegate, | 33 RenderViewHostDelegate* delegate, |
35 RenderWidgetHostDelegate* widget_delegate, | 34 RenderWidgetHostDelegate* widget_delegate, |
36 int32_t routing_id, | 35 int32_t routing_id, |
37 int32_t main_frame_routing_id, | 36 int32_t main_frame_routing_id, |
38 bool swapped_out) override; | 37 bool swapped_out) override; |
39 | 38 |
40 private: | 39 private: |
41 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); | 40 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); |
42 }; | 41 }; |
43 | 42 |
44 } // namespace content | 43 } // namespace content |
45 | 44 |
46 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ | 45 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ |
OLD | NEW |