| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 params.gesture = NavigationGestureUser; | 96 params.gesture = NavigationGestureUser; |
| 97 params.was_within_same_page = false; | 97 params.was_within_same_page = false; |
| 98 params.is_post = false; | 98 params.is_post = false; |
| 99 params.page_state = PageState::CreateFromURL(url); | 99 params.page_state = PageState::CreateFromURL(url); |
| 100 | 100 |
| 101 RenderFrameHostImpl* rfhi = | 101 RenderFrameHostImpl* rfhi = |
| 102 static_cast<RenderFrameHostImpl*>(render_frame_host); | 102 static_cast<RenderFrameHostImpl*>(render_frame_host); |
| 103 rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params); | 103 rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool TestWebContents::CrossNavigationPending() { |
| 107 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 108 switches::kEnableBrowserSideNavigation)) { |
| 109 return GetRenderManager()->pending_commit_speculative_frame_; |
| 110 } |
| 111 return GetRenderManager()->cross_navigation_pending_; |
| 112 } |
| 113 |
| 106 bool TestWebContents::CreateRenderViewForRenderManager( | 114 bool TestWebContents::CreateRenderViewForRenderManager( |
| 107 RenderViewHost* render_view_host, | 115 RenderViewHost* render_view_host, |
| 108 int opener_route_id, | 116 int opener_route_id, |
| 109 int proxy_routing_id, | 117 int proxy_routing_id, |
| 110 bool for_main_frame) { | 118 bool for_main_frame) { |
| 111 UpdateMaxPageIDIfNecessary(render_view_host); | 119 UpdateMaxPageIDIfNecessary(render_view_host); |
| 112 // This will go to a TestRenderViewHost. | 120 // This will go to a TestRenderViewHost. |
| 113 static_cast<RenderViewHostImpl*>( | 121 static_cast<RenderViewHostImpl*>( |
| 114 render_view_host)->CreateRenderView(base::string16(), | 122 render_view_host)->CreateRenderView(base::string16(), |
| 115 opener_route_id, | 123 opener_route_id, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 266 } |
| 259 | 267 |
| 260 void TestWebContents::ShowCreatedWidget(int route_id, | 268 void TestWebContents::ShowCreatedWidget(int route_id, |
| 261 const gfx::Rect& initial_rect) { | 269 const gfx::Rect& initial_rect) { |
| 262 } | 270 } |
| 263 | 271 |
| 264 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 272 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 265 } | 273 } |
| 266 | 274 |
| 267 } // namespace content | 275 } // namespace content |
| OLD | NEW |