OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.h" | 5 #include "content/test/test_render_frame.h" |
6 | 6 |
7 #include "content/common/navigation_params.h" | 7 #include "content/common/navigation_params.h" |
| 8 #include "content/common/resource_request_body.h" |
8 #include "content/public/common/browser_side_navigation_policy.h" | 9 #include "content/public/common/browser_side_navigation_policy.h" |
9 #include "content/public/common/resource_response.h" | 10 #include "content/public/common/resource_response.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 // static | 14 // static |
14 RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame( | 15 RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame( |
15 const RenderFrameImpl::CreateParams& params) { | 16 const RenderFrameImpl::CreateParams& params) { |
16 return new TestRenderFrame(params); | 17 return new TestRenderFrame(params); |
17 } | 18 } |
18 | 19 |
19 TestRenderFrame::TestRenderFrame(const RenderFrameImpl::CreateParams& params) | 20 TestRenderFrame::TestRenderFrame(const RenderFrameImpl::CreateParams& params) |
20 : RenderFrameImpl(params) { | 21 : RenderFrameImpl(params) { |
21 } | 22 } |
22 | 23 |
23 TestRenderFrame::~TestRenderFrame() { | 24 TestRenderFrame::~TestRenderFrame() { |
24 } | 25 } |
25 | 26 |
26 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params, | 27 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params, |
27 const StartNavigationParams& start_params, | 28 const StartNavigationParams& start_params, |
28 const RequestNavigationParams& request_params) { | 29 const RequestNavigationParams& request_params) { |
29 // PlzNavigate | 30 // PlzNavigate |
30 if (IsBrowserSideNavigationEnabled()) { | 31 if (IsBrowserSideNavigationEnabled()) { |
31 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params, | 32 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params, |
32 request_params); | 33 request_params, nullptr); |
33 } else { | 34 } else { |
34 OnNavigate(common_params, start_params, request_params); | 35 OnNavigate(common_params, start_params, request_params); |
35 } | 36 } |
36 } | 37 } |
37 | 38 |
38 void TestRenderFrame::SwapOut( | 39 void TestRenderFrame::SwapOut( |
39 int proxy_routing_id, | 40 int proxy_routing_id, |
40 bool is_loading, | 41 bool is_loading, |
41 const FrameReplicationState& replicated_frame_state) { | 42 const FrameReplicationState& replicated_frame_state) { |
42 OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state); | 43 OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state); |
(...skipping 16 matching lines...) Expand all Loading... |
59 } | 60 } |
60 | 61 |
61 void TestRenderFrame::SetCompositionFromExistingText( | 62 void TestRenderFrame::SetCompositionFromExistingText( |
62 int start, | 63 int start, |
63 int end, | 64 int end, |
64 const std::vector<blink::WebCompositionUnderline>& underlines) { | 65 const std::vector<blink::WebCompositionUnderline>& underlines) { |
65 OnSetCompositionFromExistingText(start, end, underlines); | 66 OnSetCompositionFromExistingText(start, end, underlines); |
66 } | 67 } |
67 | 68 |
68 } // namespace content | 69 } // namespace content |
OLD | NEW |