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 #include "content/test/test_web_contents.h" | 5 #include "content/test/test_web_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "content/browser/browser_url_handler_impl.h" | 10 #include "content/browser/browser_url_handler_impl.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 return GetRenderManager()->speculative_render_frame_host_ && | 121 return GetRenderManager()->speculative_render_frame_host_ && |
122 static_cast<TestRenderFrameHost*>( | 122 static_cast<TestRenderFrameHost*>( |
123 GetRenderManager()->speculative_render_frame_host_.get()) | 123 GetRenderManager()->speculative_render_frame_host_.get()) |
124 ->pending_commit(); | 124 ->pending_commit(); |
125 } | 125 } |
126 return GetRenderManager()->pending_frame_host() != nullptr; | 126 return GetRenderManager()->pending_frame_host() != nullptr; |
127 } | 127 } |
128 | 128 |
129 bool TestWebContents::CreateRenderViewForRenderManager( | 129 bool TestWebContents::CreateRenderViewForRenderManager( |
130 RenderViewHost* render_view_host, | 130 RenderViewHost* render_view_host, |
131 int opener_route_id, | 131 int opener_frame_routing_id, |
132 int proxy_routing_id, | 132 int proxy_routing_id, |
133 const FrameReplicationState& replicated_frame_state, | 133 const FrameReplicationState& replicated_frame_state, |
134 bool for_main_frame) { | 134 bool for_main_frame) { |
135 UpdateMaxPageIDIfNecessary(render_view_host); | 135 UpdateMaxPageIDIfNecessary(render_view_host); |
136 // This will go to a TestRenderViewHost. | 136 // This will go to a TestRenderViewHost. |
137 static_cast<RenderViewHostImpl*>( | 137 static_cast<RenderViewHostImpl*>(render_view_host) |
138 render_view_host)->CreateRenderView(opener_route_id, | 138 ->CreateRenderView(opener_frame_routing_id, proxy_routing_id, -1, |
139 proxy_routing_id, | 139 replicated_frame_state, false); |
140 -1, | |
141 replicated_frame_state, | |
142 false); | |
143 return true; | 140 return true; |
144 } | 141 } |
145 | 142 |
146 WebContents* TestWebContents::Clone() { | 143 WebContents* TestWebContents::Clone() { |
147 WebContentsImpl* contents = | 144 WebContentsImpl* contents = |
148 Create(GetBrowserContext(), SiteInstance::Create(GetBrowserContext())); | 145 Create(GetBrowserContext(), SiteInstance::Create(GetBrowserContext())); |
149 contents->GetController().CopyStateFrom(controller_); | 146 contents->GetController().CopyStateFrom(controller_); |
150 return contents; | 147 return contents; |
151 } | 148 } |
152 | 149 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 298 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
302 } | 299 } |
303 | 300 |
304 void TestWebContents::SaveFrameWithHeaders(const GURL& url, | 301 void TestWebContents::SaveFrameWithHeaders(const GURL& url, |
305 const Referrer& referrer, | 302 const Referrer& referrer, |
306 const std::string& headers) { | 303 const std::string& headers) { |
307 save_frame_headers_ = headers; | 304 save_frame_headers_ = headers; |
308 } | 305 } |
309 | 306 |
310 } // namespace content | 307 } // namespace content |
OLD | NEW |