Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: content/test/test_render_view_host_factory.h

Issue 16032007: Create RenderFrame/RenderFrameHost for the main frame of a page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing routing ID expectations. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/browser/renderer_host/render_view_host_factory.h" 10 #include "content/browser/renderer_host/render_view_host_factory.h"
(...skipping 14 matching lines...) Expand all
25 explicit TestRenderViewHostFactory(RenderProcessHostFactory* rph_factory); 25 explicit TestRenderViewHostFactory(RenderProcessHostFactory* rph_factory);
26 virtual ~TestRenderViewHostFactory(); 26 virtual ~TestRenderViewHostFactory();
27 27
28 virtual void set_render_process_host_factory( 28 virtual void set_render_process_host_factory(
29 RenderProcessHostFactory* rph_factory); 29 RenderProcessHostFactory* rph_factory);
30 virtual RenderViewHost* CreateRenderViewHost( 30 virtual RenderViewHost* CreateRenderViewHost(
31 SiteInstance* instance, 31 SiteInstance* instance,
32 RenderViewHostDelegate* delegate, 32 RenderViewHostDelegate* delegate,
33 RenderWidgetHostDelegate* widget_delegate, 33 RenderWidgetHostDelegate* widget_delegate,
34 int routing_id, 34 int routing_id,
35 int main_frame_routing_id,
35 bool swapped_out, 36 bool swapped_out,
36 SessionStorageNamespace* session_storage) OVERRIDE; 37 SessionStorageNamespace* session_storage) OVERRIDE;
37 38
38 private: 39 private:
39 // This is a bit of a hack. With the current design of the site instances / 40 // This is a bit of a hack. With the current design of the site instances /
40 // browsing instances, it's difficult to pass a RenderProcessHostFactory 41 // browsing instances, it's difficult to pass a RenderProcessHostFactory
41 // around properly. 42 // around properly.
42 // 43 //
43 // Instead, we set it right before we create a new RenderViewHost, which 44 // Instead, we set it right before we create a new RenderViewHost, which
44 // happens before the RenderProcessHost is created. This way, the instance 45 // happens before the RenderProcessHost is created. This way, the instance
45 // has the correct factory and creates our special RenderProcessHosts. 46 // has the correct factory and creates our special RenderProcessHosts.
46 RenderProcessHostFactory* render_process_host_factory_; 47 RenderProcessHostFactory* render_process_host_factory_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); 49 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory);
49 }; 50 };
50 51
51 } // namespace content 52 } // namespace content
52 53
53 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_ 54 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl_params.cc ('k') | content/test/test_render_view_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698