| 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 6125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6136 GetFetchCredentialsModeForWebURLRequest(info.urlRequest)); | 6136 GetFetchCredentialsModeForWebURLRequest(info.urlRequest)); |
| 6137 DCHECK(GetFetchRedirectModeForWebURLRequest(info.urlRequest) == | 6137 DCHECK(GetFetchRedirectModeForWebURLRequest(info.urlRequest) == |
| 6138 FetchRedirectMode::MANUAL_MODE); | 6138 FetchRedirectMode::MANUAL_MODE); |
| 6139 DCHECK(frame_->parent() || | 6139 DCHECK(frame_->parent() || |
| 6140 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == | 6140 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == |
| 6141 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); | 6141 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); |
| 6142 DCHECK(!frame_->parent() || | 6142 DCHECK(!frame_->parent() || |
| 6143 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == | 6143 GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) == |
| 6144 REQUEST_CONTEXT_FRAME_TYPE_NESTED); | 6144 REQUEST_CONTEXT_FRAME_TYPE_NESTED); |
| 6145 | 6145 |
| 6146 base::Optional<url::Origin> initiator = |
| 6147 info.urlRequest.requestorOrigin().isNull() |
| 6148 ? base::Optional<url::Origin>() |
| 6149 : base::Optional<url::Origin>(info.urlRequest.requestorOrigin()); |
| 6146 BeginNavigationParams begin_navigation_params( | 6150 BeginNavigationParams begin_navigation_params( |
| 6147 GetWebURLRequestHeaders(info.urlRequest), | 6151 GetWebURLRequestHeaders(info.urlRequest), |
| 6148 GetLoadFlagsForWebURLRequest(info.urlRequest), | 6152 GetLoadFlagsForWebURLRequest(info.urlRequest), |
| 6149 info.urlRequest.skipServiceWorker() != | 6153 info.urlRequest.skipServiceWorker() != |
| 6150 blink::WebURLRequest::SkipServiceWorker::None, | 6154 blink::WebURLRequest::SkipServiceWorker::None, |
| 6151 GetRequestContextTypeForWebURLRequest(info.urlRequest)); | 6155 GetRequestContextTypeForWebURLRequest(info.urlRequest), initiator); |
| 6152 | 6156 |
| 6153 if (!info.form.isNull()) { | 6157 if (!info.form.isNull()) { |
| 6154 WebSearchableFormData web_searchable_form_data(info.form); | 6158 WebSearchableFormData web_searchable_form_data(info.form); |
| 6155 begin_navigation_params.searchable_form_url = | 6159 begin_navigation_params.searchable_form_url = |
| 6156 web_searchable_form_data.url(); | 6160 web_searchable_form_data.url(); |
| 6157 begin_navigation_params.searchable_form_encoding = | 6161 begin_navigation_params.searchable_form_encoding = |
| 6158 web_searchable_form_data.encoding().utf8(); | 6162 web_searchable_form_data.encoding().utf8(); |
| 6159 } | 6163 } |
| 6160 | 6164 |
| 6161 Send(new FrameHostMsg_BeginNavigation( | 6165 Send(new FrameHostMsg_BeginNavigation( |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6696 // event target. Potentially a Pepper plugin will receive the event. | 6700 // event target. Potentially a Pepper plugin will receive the event. |
| 6697 // In order to tell whether a plugin gets the last mouse event and which it | 6701 // In order to tell whether a plugin gets the last mouse event and which it |
| 6698 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6702 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6699 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6703 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6700 // |pepper_last_mouse_event_target_|. | 6704 // |pepper_last_mouse_event_target_|. |
| 6701 pepper_last_mouse_event_target_ = nullptr; | 6705 pepper_last_mouse_event_target_ = nullptr; |
| 6702 #endif | 6706 #endif |
| 6703 } | 6707 } |
| 6704 | 6708 |
| 6705 } // namespace content | 6709 } // namespace content |
| OLD | NEW |