Chromium Code Reviews| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 623 | 623 |
| 624 const RequestExtraData* extra_data = | 624 const RequestExtraData* extra_data = |
| 625 static_cast<RequestExtraData*>(info.urlRequest.getExtraData()); | 625 static_cast<RequestExtraData*>(info.urlRequest.getExtraData()); |
| 626 DCHECK(extra_data); | 626 DCHECK(extra_data); |
| 627 return CommonNavigationParams( | 627 return CommonNavigationParams( |
| 628 info.urlRequest.url(), referrer, extra_data->transition_type(), | 628 info.urlRequest.url(), referrer, extra_data->transition_type(), |
| 629 navigation_type, true, info.replacesCurrentHistoryItem, ui_timestamp, | 629 navigation_type, true, info.replacesCurrentHistoryItem, ui_timestamp, |
| 630 report_type, GURL(), GURL(), | 630 report_type, GURL(), GURL(), |
| 631 static_cast<LoFiState>(info.urlRequest.getLoFiState()), | 631 static_cast<LoFiState>(info.urlRequest.getLoFiState()), |
| 632 base::TimeTicks::Now(), info.urlRequest.httpMethod().latin1(), | 632 base::TimeTicks::Now(), info.urlRequest.httpMethod().latin1(), |
| 633 (!info.urlRequest.httpBody().isNull() ? | |
|
jam
2016/10/13 04:34:30
nit: this would be more readable without the doubl
| |
| 634 info.urlRequest.httpBody().containsPasswordData() : false), | |
| 633 GetRequestBodyForWebURLRequest(info.urlRequest)); | 635 GetRequestBodyForWebURLRequest(info.urlRequest)); |
| 634 } | 636 } |
| 635 | 637 |
| 636 media::Context3D GetSharedMainThreadContext3D( | 638 media::Context3D GetSharedMainThreadContext3D( |
| 637 scoped_refptr<ContextProviderCommandBuffer> provider) { | 639 scoped_refptr<ContextProviderCommandBuffer> provider) { |
| 638 if (!provider) | 640 if (!provider) |
| 639 return media::Context3D(); | 641 return media::Context3D(); |
| 640 return media::Context3D(provider->ContextGL(), provider->GrContext()); | 642 return media::Context3D(provider->ContextGL(), provider->GrContext()); |
| 641 } | 643 } |
| 642 | 644 |
| (...skipping 4947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5590 blink::WebHistoryDifferentDocumentLoad; | 5592 blink::WebHistoryDifferentDocumentLoad; |
| 5591 bool should_load_request = false; | 5593 bool should_load_request = false; |
| 5592 WebHistoryItem item_for_history_navigation; | 5594 WebHistoryItem item_for_history_navigation; |
| 5593 WebURLRequest request = | 5595 WebURLRequest request = |
| 5594 CreateURLRequestForNavigation(common_params, std::move(stream_params), | 5596 CreateURLRequestForNavigation(common_params, std::move(stream_params), |
| 5595 frame_->isViewSourceModeEnabled()); | 5597 frame_->isViewSourceModeEnabled()); |
| 5596 request.setFrameType(IsTopLevelNavigation(frame_) | 5598 request.setFrameType(IsTopLevelNavigation(frame_) |
| 5597 ? blink::WebURLRequest::FrameTypeTopLevel | 5599 ? blink::WebURLRequest::FrameTypeTopLevel |
| 5598 : blink::WebURLRequest::FrameTypeNested); | 5600 : blink::WebURLRequest::FrameTypeNested); |
| 5599 | 5601 |
| 5600 if (IsBrowserSideNavigationEnabled() && common_params.post_data) | 5602 if (IsBrowserSideNavigationEnabled() && common_params.post_data) { |
| 5601 request.setHTTPBody(GetWebHTTPBodyForRequestBody(common_params.post_data)); | 5603 WebHTTPBody http_body = |
| 5602 | 5604 GetWebHTTPBodyForRequestBody(common_params.post_data); |
| 5605 // We need to preserve the fact that the HTTP body contains passwords. This | |
| 5606 // ensures that the page state is updated correctly in the browser. This | |
| 5607 // eventually ensures that the page state is stripped of password data | |
| 5608 // before being serialized to disk. | |
| 5609 http_body.setContainsPasswordData(common_params.post_contains_passwords); | |
| 5610 request.setHTTPBody(http_body); | |
| 5611 } | |
| 5603 // Used to determine whether this frame is actually loading a request as part | 5612 // Used to determine whether this frame is actually loading a request as part |
| 5604 // of a history navigation. | 5613 // of a history navigation. |
| 5605 bool has_history_navigation_in_frame = false; | 5614 bool has_history_navigation_in_frame = false; |
| 5606 | 5615 |
| 5607 #if defined(OS_ANDROID) | 5616 #if defined(OS_ANDROID) |
| 5608 request.setHasUserGesture(request_params.has_user_gesture); | 5617 request.setHasUserGesture(request_params.has_user_gesture); |
| 5609 #endif | 5618 #endif |
| 5610 | 5619 |
| 5611 if (browser_side_navigation) { | 5620 if (browser_side_navigation) { |
| 5612 // PlzNavigate: Make sure that Blink's loader will not try to use browser | 5621 // PlzNavigate: Make sure that Blink's loader will not try to use browser |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6491 // event target. Potentially a Pepper plugin will receive the event. | 6500 // event target. Potentially a Pepper plugin will receive the event. |
| 6492 // In order to tell whether a plugin gets the last mouse event and which it | 6501 // In order to tell whether a plugin gets the last mouse event and which it |
| 6493 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6502 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6494 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6503 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6495 // |pepper_last_mouse_event_target_|. | 6504 // |pepper_last_mouse_event_target_|. |
| 6496 pepper_last_mouse_event_target_ = nullptr; | 6505 pepper_last_mouse_event_target_ = nullptr; |
| 6497 #endif | 6506 #endif |
| 6498 } | 6507 } |
| 6499 | 6508 |
| 6500 } // namespace content | 6509 } // namespace content |
| OLD | NEW |