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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_route_id, |
132 int proxy_routing_id, | 132 int proxy_routing_id, |
| 133 const FrameReplicationState& replicated_frame_state, |
133 bool for_main_frame) { | 134 bool for_main_frame) { |
134 UpdateMaxPageIDIfNecessary(render_view_host); | 135 UpdateMaxPageIDIfNecessary(render_view_host); |
135 // This will go to a TestRenderViewHost. | 136 // This will go to a TestRenderViewHost. |
136 static_cast<RenderViewHostImpl*>( | 137 static_cast<RenderViewHostImpl*>( |
137 render_view_host)->CreateRenderView(base::string16(), | 138 render_view_host)->CreateRenderView(base::string16(), |
138 opener_route_id, | 139 opener_route_id, |
139 proxy_routing_id, | 140 proxy_routing_id, |
140 -1, false); | 141 -1, |
| 142 replicated_frame_state, |
| 143 false); |
141 return true; | 144 return true; |
142 } | 145 } |
143 | 146 |
144 WebContents* TestWebContents::Clone() { | 147 WebContents* TestWebContents::Clone() { |
145 WebContentsImpl* contents = | 148 WebContentsImpl* contents = |
146 Create(GetBrowserContext(), SiteInstance::Create(GetBrowserContext())); | 149 Create(GetBrowserContext(), SiteInstance::Create(GetBrowserContext())); |
147 contents->GetController().CopyStateFrom(controller_); | 150 contents->GetController().CopyStateFrom(controller_); |
148 return contents; | 151 return contents; |
149 } | 152 } |
150 | 153 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 292 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
290 } | 293 } |
291 | 294 |
292 void TestWebContents::SaveFrameWithHeaders(const GURL& url, | 295 void TestWebContents::SaveFrameWithHeaders(const GURL& url, |
293 const Referrer& referrer, | 296 const Referrer& referrer, |
294 const std::string& headers) { | 297 const std::string& headers) { |
295 save_frame_headers_ = headers; | 298 save_frame_headers_ = headers; |
296 } | 299 } |
297 | 300 |
298 } // namespace content | 301 } // namespace content |
OLD | NEW |