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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 if (!render_view_host()->IsRenderViewLive()) { | 80 if (!render_view_host()->IsRenderViewLive()) { |
81 RenderViewHostTester::For(render_view_host())->CreateTestRenderView( | 81 RenderViewHostTester::For(render_view_host())->CreateTestRenderView( |
82 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); | 82 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 TestRenderFrameHost* TestRenderFrameHost::AppendChild( | 86 TestRenderFrameHost* TestRenderFrameHost::AppendChild( |
87 const std::string& frame_name) { | 87 const std::string& frame_name) { |
88 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), | 88 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), |
89 blink::WebTreeScopeType::Document, frame_name, | 89 blink::WebTreeScopeType::Document, frame_name, |
90 blink::WebSandboxFlags::None); | 90 blink::WebSandboxFlags::None, |
| 91 blink::WebFrameOwnerProperties()); |
91 return static_cast<TestRenderFrameHost*>( | 92 return static_cast<TestRenderFrameHost*>( |
92 child_creation_observer_.last_created_frame()); | 93 child_creation_observer_.last_created_frame()); |
93 } | 94 } |
94 | 95 |
95 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { | 96 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { |
96 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 97 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
97 switches::kEnableBrowserSideNavigation)) { | 98 switches::kEnableBrowserSideNavigation)) { |
98 SendRendererInitiatedNavigationRequest(url, false); | 99 SendRendererInitiatedNavigationRequest(url, false); |
99 return; | 100 return; |
100 } | 101 } |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // cleared during DidFailProvisionalLoad). | 396 // cleared during DidFailProvisionalLoad). |
396 int page_id = entry ? entry->GetPageID() : -1; | 397 int page_id = entry ? entry->GetPageID() : -1; |
397 if (page_id == -1) { | 398 if (page_id == -1) { |
398 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 399 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
399 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 400 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
400 } | 401 } |
401 return page_id; | 402 return page_id; |
402 } | 403 } |
403 | 404 |
404 } // namespace content | 405 } // namespace content |
OLD | NEW |