OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 6087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6098 GetFetchCredentialsModeForWebURLRequest(info.urlRequest)); | 6098 GetFetchCredentialsModeForWebURLRequest(info.urlRequest)); |
6099 DCHECK(GetFetchRedirectModeForWebURLRequest(info.urlRequest) == | 6099 DCHECK(GetFetchRedirectModeForWebURLRequest(info.urlRequest) == |
6100 FetchRedirectMode::MANUAL_MODE); | 6100 FetchRedirectMode::MANUAL_MODE); |
6101 DCHECK(frame_->parent() || | 6101 DCHECK(frame_->parent() || |
6102 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == | 6102 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == |
6103 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); | 6103 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); |
6104 DCHECK(!frame_->parent() || | 6104 DCHECK(!frame_->parent() || |
6105 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == | 6105 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == |
6106 REQUEST_CONTEXT_FRAME_TYPE_NESTED); | 6106 REQUEST_CONTEXT_FRAME_TYPE_NESTED); |
6107 | 6107 |
| 6108 base::Optional<url::Origin> initiator = |
| 6109 info.urlRequest.requestorOrigin().isNull() |
| 6110 ? base::Optional<url::Origin>() |
| 6111 : base::Optional<url::Origin>(info.urlRequest.requestorOrigin()); |
6108 Send(new FrameHostMsg_BeginNavigation( | 6112 Send(new FrameHostMsg_BeginNavigation( |
6109 routing_id_, MakeCommonNavigationParams(info), | 6113 routing_id_, MakeCommonNavigationParams(info), |
6110 BeginNavigationParams( | 6114 BeginNavigationParams( |
6111 GetWebURLRequestHeaders(info.urlRequest), | 6115 GetWebURLRequestHeaders(info.urlRequest), |
6112 GetLoadFlagsForWebURLRequest(info.urlRequest), | 6116 GetLoadFlagsForWebURLRequest(info.urlRequest), |
6113 info.urlRequest.hasUserGesture(), | 6117 info.urlRequest.hasUserGesture(), |
6114 info.urlRequest.skipServiceWorker() != | 6118 info.urlRequest.skipServiceWorker() != |
6115 blink::WebURLRequest::SkipServiceWorker::None, | 6119 blink::WebURLRequest::SkipServiceWorker::None, |
6116 GetRequestContextTypeForWebURLRequest(info.urlRequest)))); | 6120 GetRequestContextTypeForWebURLRequest(info.urlRequest), initiator))); |
6117 } | 6121 } |
6118 | 6122 |
6119 void RenderFrameImpl::LoadDataURL( | 6123 void RenderFrameImpl::LoadDataURL( |
6120 const CommonNavigationParams& params, | 6124 const CommonNavigationParams& params, |
6121 const RequestNavigationParams& request_params, | 6125 const RequestNavigationParams& request_params, |
6122 WebLocalFrame* frame, | 6126 WebLocalFrame* frame, |
6123 blink::WebFrameLoadType load_type, | 6127 blink::WebFrameLoadType load_type, |
6124 blink::WebHistoryItem item_for_history_navigation, | 6128 blink::WebHistoryItem item_for_history_navigation, |
6125 blink::WebHistoryLoadType history_load_type, | 6129 blink::WebHistoryLoadType history_load_type, |
6126 bool is_client_redirect) { | 6130 bool is_client_redirect) { |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6613 // event target. Potentially a Pepper plugin will receive the event. | 6617 // event target. Potentially a Pepper plugin will receive the event. |
6614 // In order to tell whether a plugin gets the last mouse event and which it | 6618 // In order to tell whether a plugin gets the last mouse event and which it |
6615 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6619 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6616 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6620 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6617 // |pepper_last_mouse_event_target_|. | 6621 // |pepper_last_mouse_event_target_|. |
6618 pepper_last_mouse_event_target_ = nullptr; | 6622 pepper_last_mouse_event_target_ = nullptr; |
6619 #endif | 6623 #endif |
6620 } | 6624 } |
6621 | 6625 |
6622 } // namespace content | 6626 } // namespace content |
OLD | NEW |