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 COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 Base::didDetectXSS(insecure_url, did_block_entire_page); | 224 Base::didDetectXSS(insecure_url, did_block_entire_page); |
225 } | 225 } |
226 | 226 |
227 void didDispatchPingLoader(const blink::WebURL& url) override { | 227 void didDispatchPingLoader(const blink::WebURL& url) override { |
228 // This is not implemented in RenderFrameImpl, so need to explicitly call | 228 // This is not implemented in RenderFrameImpl, so need to explicitly call |
229 // into the base proxy. | 229 // into the base proxy. |
230 test_client()->didDispatchPingLoader(url); | 230 test_client()->didDispatchPingLoader(url); |
231 Base::didDispatchPingLoader(url); | 231 Base::didDispatchPingLoader(url); |
232 } | 232 } |
233 | 233 |
234 void willSendRequest( | 234 void willSendRequest(blink::WebLocalFrame* frame, |
235 blink::WebLocalFrame* frame, | 235 blink::WebURLRequest& request) override { |
236 unsigned identifier, | 236 Base::willSendRequest(frame, request); |
237 blink::WebURLRequest& request, | 237 test_client()->willSendRequest(frame, request); |
238 const blink::WebURLResponse& redirect_response) override { | |
239 Base::willSendRequest(frame, identifier, request, redirect_response); | |
240 test_client()->willSendRequest(frame, identifier, request, | |
241 redirect_response); | |
242 } | 238 } |
243 | 239 |
244 void didReceiveResponse(unsigned identifier, | 240 void didReceiveResponse(const blink::WebURLResponse& response) override { |
245 const blink::WebURLResponse& response) override { | 241 test_client()->didReceiveResponse(response); |
246 test_client()->didReceiveResponse(identifier, response); | 242 Base::didReceiveResponse(response); |
247 Base::didReceiveResponse(identifier, response); | |
248 } | |
249 | |
250 void didChangeResourcePriority(unsigned identifier, | |
251 const blink::WebURLRequest::Priority& priority, | |
252 int intra_priority_value) override { | |
253 // This is not implemented in RenderFrameImpl, so need to explicitly call | |
254 // into the base proxy. | |
255 test_client()->didChangeResourcePriority(identifier, priority, | |
256 intra_priority_value); | |
257 Base::didChangeResourcePriority( | |
258 identifier, priority, intra_priority_value); | |
259 } | |
260 | |
261 void didFinishResourceLoad(blink::WebLocalFrame* frame, | |
262 unsigned identifier) override { | |
263 test_client()->didFinishResourceLoad(frame, identifier); | |
264 } | 243 } |
265 | 244 |
266 blink::WebNavigationPolicy decidePolicyForNavigation( | 245 blink::WebNavigationPolicy decidePolicyForNavigation( |
267 const blink::WebFrameClient::NavigationPolicyInfo& info) override { | 246 const blink::WebFrameClient::NavigationPolicyInfo& info) override { |
268 blink::WebNavigationPolicy policy = | 247 blink::WebNavigationPolicy policy = |
269 test_client()->decidePolicyForNavigation(info); | 248 test_client()->decidePolicyForNavigation(info); |
270 if (policy == blink::WebNavigationPolicyIgnore) | 249 if (policy == blink::WebNavigationPolicyIgnore) |
271 return policy; | 250 return policy; |
272 | 251 |
273 return Base::decidePolicyForNavigation(info); | 252 return Base::decidePolicyForNavigation(info); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return test_client()->runFileChooser(params, completion); | 290 return test_client()->runFileChooser(params, completion); |
312 } | 291 } |
313 | 292 |
314 private: | 293 private: |
315 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 294 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
316 }; | 295 }; |
317 | 296 |
318 } // namespace test_runner | 297 } // namespace test_runner |
319 | 298 |
320 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 299 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
OLD | NEW |