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/browser/web_contents/test_web_contents.h" | 5 #include "content/browser/web_contents/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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 int page_id = entry->GetPageID(); | 143 int page_id = entry->GetPageID(); |
144 if (page_id == -1) { | 144 if (page_id == -1) { |
145 // It's a new navigation, assign a never-seen page id to it. | 145 // It's a new navigation, assign a never-seen page id to it. |
146 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1; | 146 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1; |
147 } | 147 } |
148 rvh->SendNavigate(page_id, entry->GetURL()); | 148 rvh->SendNavigate(page_id, entry->GetURL()); |
149 | 149 |
150 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation | 150 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation |
151 // without making any network requests. | 151 // without making any network requests. |
152 if (old_rvh != rvh) | 152 if (old_rvh != rvh) |
153 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwapOutACK(); | 153 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwapOutACK(false); |
154 } | 154 } |
155 | 155 |
156 int TestWebContents::GetNumberOfFocusCalls() { | 156 int TestWebContents::GetNumberOfFocusCalls() { |
157 NOTREACHED(); | 157 NOTREACHED(); |
158 return 0; | 158 return 0; |
159 } | 159 } |
160 | 160 |
161 void TestWebContents::ProceedWithCrossSiteNavigation() { | 161 void TestWebContents::ProceedWithCrossSiteNavigation() { |
162 if (!GetPendingRenderViewHost()) | 162 if (!GetPendingRenderViewHost()) |
163 return; | 163 return; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 222 } |
223 | 223 |
224 void TestWebContents::ShowCreatedWidget(int route_id, | 224 void TestWebContents::ShowCreatedWidget(int route_id, |
225 const gfx::Rect& initial_pos) { | 225 const gfx::Rect& initial_pos) { |
226 } | 226 } |
227 | 227 |
228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
229 } | 229 } |
230 | 230 |
231 } // namespace content | 231 } // namespace content |
OLD | NEW |