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

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

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to get Android build fix 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('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 "content/browser/browser_url_handler_impl.h" 9 #include "content/browser/browser_url_handler_impl.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 int page_id = entry->GetPageID(); 142 int page_id = entry->GetPageID();
143 if (page_id == -1) { 143 if (page_id == -1) {
144 // It's a new navigation, assign a never-seen page id to it. 144 // It's a new navigation, assign a never-seen page id to it.
145 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1; 145 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1;
146 } 146 }
147 rvh->SendNavigate(page_id, entry->GetURL()); 147 rvh->SendNavigate(page_id, entry->GetURL());
148 148
149 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation 149 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation
150 // without making any network requests. 150 // without making any network requests.
151 if (old_rvh != rvh) 151 if (old_rvh != rvh)
152 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwapOutACK(false); 152 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwappedOut(false);
153 } 153 }
154 154
155 void TestWebContents::ProceedWithCrossSiteNavigation() { 155 void TestWebContents::ProceedWithCrossSiteNavigation() {
156 if (!GetPendingRenderViewHost()) 156 if (!GetPendingRenderViewHost())
157 return; 157 return;
158 TestRenderViewHost* rvh = static_cast<TestRenderViewHost*>( 158 TestRenderViewHost* rvh = static_cast<TestRenderViewHost*>(
159 render_manager_.current_host()); 159 render_manager_.current_host());
160 rvh->SendShouldCloseACK(true); 160 rvh->SendShouldCloseACK(true);
161 } 161 }
162 162
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 void TestWebContents::ShowCreatedWidget(int route_id, 242 void TestWebContents::ShowCreatedWidget(int route_id,
243 const gfx::Rect& initial_pos) { 243 const gfx::Rect& initial_pos) {
244 } 244 }
245 245
246 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 246 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
247 } 247 }
248 248
249 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698