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

Side by Side Diff: content/test/test_web_contents.cc

Issue 1202593002: Move browser-to-renderer opener plumbing to frame routing IDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opener-create-opener-render-views
Patch Set: Remove suppress_opener Created 5 years, 5 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
« no previous file with comments | « content/test/test_web_contents.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « content/test/test_web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698