OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/shell/renderer/test_runner/TestInterfaces.h" | 9 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
10 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 10 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 virtual void loadURLExternally(blink::WebLocalFrame* frame, | 61 virtual void loadURLExternally(blink::WebLocalFrame* frame, |
62 const blink::WebURLRequest& request, | 62 const blink::WebURLRequest& request, |
63 blink::WebNavigationPolicy policy, | 63 blink::WebNavigationPolicy policy, |
64 const blink::WebString& suggested_name) { | 64 const blink::WebString& suggested_name) { |
65 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); | 65 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); |
66 Base::loadURLExternally(frame, request, policy, suggested_name); | 66 Base::loadURLExternally(frame, request, policy, suggested_name); |
67 } | 67 } |
68 | 68 |
69 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame) { | 69 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame, |
| 70 bool isTransitionNavigation) { |
70 base_proxy_->DidStartProvisionalLoad(frame); | 71 base_proxy_->DidStartProvisionalLoad(frame); |
71 Base::didStartProvisionalLoad(frame); | 72 Base::didStartProvisionalLoad(frame, isTransitionNavigation); |
72 } | 73 } |
73 | 74 |
74 virtual void didReceiveServerRedirectForProvisionalLoad( | 75 virtual void didReceiveServerRedirectForProvisionalLoad( |
75 blink::WebLocalFrame* frame) { | 76 blink::WebLocalFrame* frame) { |
76 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); | 77 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); |
77 Base::didReceiveServerRedirectForProvisionalLoad(frame); | 78 Base::didReceiveServerRedirectForProvisionalLoad(frame); |
78 } | 79 } |
79 | 80 |
80 virtual void didFailProvisionalLoad(blink::WebLocalFrame* frame, | 81 virtual void didFailProvisionalLoad(blink::WebLocalFrame* frame, |
81 const blink::WebURLError& error) { | 82 const blink::WebURLError& error) { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 frame, identifier, priority, intra_priority_value); | 238 frame, identifier, priority, intra_priority_value); |
238 } | 239 } |
239 | 240 |
240 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, | 241 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, |
241 unsigned identifier) { | 242 unsigned identifier) { |
242 base_proxy_->DidFinishResourceLoad(frame, identifier); | 243 base_proxy_->DidFinishResourceLoad(frame, identifier); |
243 Base::didFinishResourceLoad(frame, identifier); | 244 Base::didFinishResourceLoad(frame, identifier); |
244 } | 245 } |
245 | 246 |
246 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 247 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
247 blink::WebLocalFrame* frame, | 248 const blink::WebFrameClient::NavigationPolicyInfo& info) { |
248 blink::WebDataSource::ExtraData* extra_data, | |
249 const blink::WebURLRequest& request, | |
250 blink::WebNavigationType type, | |
251 blink::WebNavigationPolicy default_policy, | |
252 bool is_redirect) { | |
253 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( | 249 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( |
254 frame, extra_data, request, type, default_policy, is_redirect); | 250 info); |
255 if (policy == blink::WebNavigationPolicyIgnore) | 251 if (policy == blink::WebNavigationPolicyIgnore) |
256 return policy; | 252 return policy; |
257 | 253 |
258 return Base::decidePolicyForNavigation( | 254 return Base::decidePolicyForNavigation(info); |
259 frame, extra_data, request, type, default_policy, is_redirect); | |
260 } | 255 } |
261 | 256 |
262 virtual void willStartUsingPeerConnectionHandler( | 257 virtual void willStartUsingPeerConnectionHandler( |
263 blink::WebLocalFrame* frame, | 258 blink::WebLocalFrame* frame, |
264 blink::WebRTCPeerConnectionHandler* handler) { | 259 blink::WebRTCPeerConnectionHandler* handler) { |
265 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. | 260 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. |
266 // See http://crbug/363285. | 261 // See http://crbug/363285. |
267 } | 262 } |
268 | 263 |
269 virtual blink::WebUserMediaClient* userMediaClient() { | 264 virtual blink::WebUserMediaClient* userMediaClient() { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 #endif | 296 #endif |
302 | 297 |
303 WebTestProxyBase* base_proxy_; | 298 WebTestProxyBase* base_proxy_; |
304 | 299 |
305 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 300 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
306 }; | 301 }; |
307 | 302 |
308 } // namespace content | 303 } // namespace content |
309 | 304 |
310 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 305 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
OLD | NEW |