| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
| 9 #include "content/browser/frame_host/navigation_handle_impl.h" | 9 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 10 #include "content/browser/frame_host/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 common_params.transition = ui::PAGE_TRANSITION_LINK; | 351 common_params.transition = ui::PAGE_TRANSITION_LINK; |
| 352 OnBeginNavigation(common_params, begin_params, | 352 OnBeginNavigation(common_params, begin_params, |
| 353 scoped_refptr<ResourceRequestBody>()); | 353 scoped_refptr<ResourceRequestBody>()); |
| 354 } | 354 } |
| 355 } | 355 } |
| 356 | 356 |
| 357 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { | 357 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { |
| 358 OnDidChangeOpener(opener_routing_id); | 358 OnDidChangeOpener(opener_routing_id); |
| 359 } | 359 } |
| 360 | 360 |
| 361 void TestRenderFrameHost::DidEnforceStrictMixedContentChecking() { |
| 362 OnDidEnforceStrictMixedContentChecking(); |
| 363 } |
| 364 |
| 361 void TestRenderFrameHost::PrepareForCommit() { | 365 void TestRenderFrameHost::PrepareForCommit() { |
| 362 PrepareForCommitWithServerRedirect(GURL()); | 366 PrepareForCommitWithServerRedirect(GURL()); |
| 363 } | 367 } |
| 364 | 368 |
| 365 void TestRenderFrameHost::PrepareForCommitWithServerRedirect( | 369 void TestRenderFrameHost::PrepareForCommitWithServerRedirect( |
| 366 const GURL& redirect_url) { | 370 const GURL& redirect_url) { |
| 367 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 371 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 368 switches::kEnableBrowserSideNavigation)) { | 372 switches::kEnableBrowserSideNavigation)) { |
| 369 // Non PlzNavigate | 373 // Non PlzNavigate |
| 370 if (is_waiting_for_beforeunload_ack()) | 374 if (is_waiting_for_beforeunload_ack()) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // cleared during DidFailProvisionalLoad). | 413 // cleared during DidFailProvisionalLoad). |
| 410 int page_id = entry ? entry->GetPageID() : -1; | 414 int page_id = entry ? entry->GetPageID() : -1; |
| 411 if (page_id == -1) { | 415 if (page_id == -1) { |
| 412 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 416 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
| 413 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 417 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
| 414 } | 418 } |
| 415 return page_id; | 419 return page_id; |
| 416 } | 420 } |
| 417 | 421 |
| 418 } // namespace content | 422 } // namespace content |
| OLD | NEW |