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_impl.h" | 8 #include "content/common/resource_request_body_impl.h" |
9 #include "content/public/common/browser_side_navigation_policy.h" | 9 #include "content/public/common/browser_side_navigation_policy.h" |
10 #include "content/public/common/resource_response.h" | 10 #include "content/public/common/resource_response.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void TestRenderFrame::DeleteSurroundingText(int before, int after) { | 55 void TestRenderFrame::DeleteSurroundingText(int before, int after) { |
56 OnDeleteSurroundingText(before, after); | 56 OnDeleteSurroundingText(before, after); |
57 } | 57 } |
58 | 58 |
59 void TestRenderFrame::DeleteSurroundingTextInCodePoints(int before, int after) { | 59 void TestRenderFrame::DeleteSurroundingTextInCodePoints(int before, int after) { |
60 OnDeleteSurroundingTextInCodePoints(before, after); | 60 OnDeleteSurroundingTextInCodePoints(before, after); |
61 } | 61 } |
62 | 62 |
63 void TestRenderFrame::Unselect() { | 63 void TestRenderFrame::CollapseSelection() { |
64 OnUnselect(); | 64 OnCollapseSelection(); |
65 } | 65 } |
66 | 66 |
67 void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) { | 67 void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) { |
68 OnSetAccessibilityMode(new_mode); | 68 OnSetAccessibilityMode(new_mode); |
69 } | 69 } |
70 | 70 |
71 void TestRenderFrame::SetCompositionFromExistingText( | 71 void TestRenderFrame::SetCompositionFromExistingText( |
72 int start, | 72 int start, |
73 int end, | 73 int end, |
74 const std::vector<blink::WebCompositionUnderline>& underlines) { | 74 const std::vector<blink::WebCompositionUnderline>& underlines) { |
75 OnSetCompositionFromExistingText(start, end, underlines); | 75 OnSetCompositionFromExistingText(start, end, underlines); |
76 } | 76 } |
77 | 77 |
78 blink::WebNavigationPolicy TestRenderFrame::decidePolicyForNavigation( | 78 blink::WebNavigationPolicy TestRenderFrame::decidePolicyForNavigation( |
79 const blink::WebFrameClient::NavigationPolicyInfo& info) { | 79 const blink::WebFrameClient::NavigationPolicyInfo& info) { |
80 if (IsBrowserSideNavigationEnabled() && | 80 if (IsBrowserSideNavigationEnabled() && |
81 info.urlRequest.checkForBrowserSideNavigation() && | 81 info.urlRequest.checkForBrowserSideNavigation() && |
82 GetWebFrame()->parent() && | 82 GetWebFrame()->parent() && |
83 info.form.isNull()) { | 83 info.form.isNull()) { |
84 // RenderViewTest::LoadHTML already disables PlzNavigate for the main frame | 84 // RenderViewTest::LoadHTML already disables PlzNavigate for the main frame |
85 // requests. However if the loaded html has a subframe, the WebURLRequest | 85 // requests. However if the loaded html has a subframe, the WebURLRequest |
86 // will be created inside Blink and it won't have this flag set. | 86 // will be created inside Blink and it won't have this flag set. |
87 info.urlRequest.setCheckForBrowserSideNavigation(false); | 87 info.urlRequest.setCheckForBrowserSideNavigation(false); |
88 } | 88 } |
89 return RenderFrameImpl::decidePolicyForNavigation(info); | 89 return RenderFrameImpl::decidePolicyForNavigation(info); |
90 } | 90 } |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
OLD | NEW |