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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |