OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 CompositorDependencies* compositor_deps, | 290 CompositorDependencies* compositor_deps, |
291 const mojom::CreateViewParams&) = nullptr; | 291 const mojom::CreateViewParams&) = nullptr; |
292 | 292 |
293 // static | 293 // static |
294 Referrer RenderViewImpl::GetReferrerFromRequest( | 294 Referrer RenderViewImpl::GetReferrerFromRequest( |
295 WebFrame* frame, | 295 WebFrame* frame, |
296 const WebURLRequest& request) { | 296 const WebURLRequest& request) { |
297 return Referrer( | 297 return Referrer( |
298 blink::WebStringToGURL(request.httpHeaderField( | 298 blink::WebStringToGURL(request.httpHeaderField( |
299 WebString::fromUTF8("Referer"))), | 299 WebString::fromUTF8("Referer"))), |
300 request.referrerPolicy()); | 300 request.getReferrerPolicy()); |
301 } | 301 } |
302 | 302 |
303 // static | 303 // static |
304 WindowOpenDisposition RenderViewImpl::NavigationPolicyToDisposition( | 304 WindowOpenDisposition RenderViewImpl::NavigationPolicyToDisposition( |
305 WebNavigationPolicy policy) { | 305 WebNavigationPolicy policy) { |
306 switch (policy) { | 306 switch (policy) { |
307 case blink::WebNavigationPolicyIgnore: | 307 case blink::WebNavigationPolicyIgnore: |
308 return WindowOpenDisposition::IGNORE_ACTION; | 308 return WindowOpenDisposition::IGNORE_ACTION; |
309 case blink::WebNavigationPolicyDownload: | 309 case blink::WebNavigationPolicyDownload: |
310 return WindowOpenDisposition::SAVE_TO_DISK; | 310 return WindowOpenDisposition::SAVE_TO_DISK; |
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2815 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2815 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2816 } | 2816 } |
2817 | 2817 |
2818 std::unique_ptr<InputEventAck> ack( | 2818 std::unique_ptr<InputEventAck> ack( |
2819 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2819 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2820 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2820 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2821 OnInputEventAck(std::move(ack)); | 2821 OnInputEventAck(std::move(ack)); |
2822 } | 2822 } |
2823 | 2823 |
2824 } // namespace content | 2824 } // namespace content |
OLD | NEW |