| 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 806 |
| 807 // Do not send subresource certificate errors if they are the same | 807 // Do not send subresource certificate errors if they are the same |
| 808 // as errors that occured during the main page load. This compares | 808 // as errors that occured during the main page load. This compares |
| 809 // most, but not all, fields of SSLStatus. For example, this check | 809 // most, but not all, fields of SSLStatus. For example, this check |
| 810 // does not compare |content_status| because the navigation entry | 810 // does not compare |content_status| because the navigation entry |
| 811 // might have mixed content but also have the exact same SSL | 811 // might have mixed content but also have the exact same SSL |
| 812 // connection properties as the subresource, thereby making the | 812 // connection properties as the subresource, thereby making the |
| 813 // subresource errors duplicative. | 813 // subresource errors duplicative. |
| 814 return (!url::Origin(GURL(url)).IsSameOriginWith( | 814 return (!url::Origin(GURL(url)).IsSameOriginWith( |
| 815 url::Origin(GURL(main_ds->request().url()))) || | 815 url::Origin(GURL(main_ds->request().url()))) || |
| 816 main_resource_ssl_status.security_style != | |
| 817 ssl_status.security_style || | |
| 818 main_resource_ssl_status.cert_id != ssl_status.cert_id || | 816 main_resource_ssl_status.cert_id != ssl_status.cert_id || |
| 819 main_resource_ssl_status.cert_status != ssl_status.cert_status || | 817 main_resource_ssl_status.cert_status != ssl_status.cert_status || |
| 820 main_resource_ssl_status.security_bits != ssl_status.security_bits || | 818 main_resource_ssl_status.security_bits != ssl_status.security_bits || |
| 821 main_resource_ssl_status.connection_status != | 819 main_resource_ssl_status.connection_status != |
| 822 ssl_status.connection_status); | 820 ssl_status.connection_status); |
| 823 } | 821 } |
| 824 | 822 |
| 825 bool IsHttpPost(const blink::WebURLRequest& request) { | 823 bool IsHttpPost(const blink::WebURLRequest& request) { |
| 826 return request.httpMethod().utf8() == "POST"; | 824 return request.httpMethod().utf8() == "POST"; |
| 827 } | 825 } |
| (...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4196 GetContentClient()->renderer()->RecordRapporURL( | 4194 GetContentClient()->renderer()->RecordRapporURL( |
| 4197 "ContentSettings.MixedScript.RanMixedScript", | 4195 "ContentSettings.MixedScript.RanMixedScript", |
| 4198 GURL(origin.toString().utf8())); | 4196 GURL(origin.toString().utf8())); |
| 4199 } | 4197 } |
| 4200 | 4198 |
| 4201 void RenderFrameImpl::didDisplayContentWithCertificateErrors( | 4199 void RenderFrameImpl::didDisplayContentWithCertificateErrors( |
| 4202 const blink::WebURL& url, | 4200 const blink::WebURL& url, |
| 4203 const blink::WebCString& security_info) { | 4201 const blink::WebCString& security_info) { |
| 4204 if (IsContentWithCertificateErrorsRelevantToUI(frame_, url, security_info)) { | 4202 if (IsContentWithCertificateErrorsRelevantToUI(frame_, url, security_info)) { |
| 4205 Send(new FrameHostMsg_DidDisplayContentWithCertificateErrors( | 4203 Send(new FrameHostMsg_DidDisplayContentWithCertificateErrors( |
| 4206 routing_id_, url, security_info)); | 4204 routing_id_, url)); |
| 4207 } | 4205 } |
| 4208 } | 4206 } |
| 4209 | 4207 |
| 4210 void RenderFrameImpl::didRunContentWithCertificateErrors( | 4208 void RenderFrameImpl::didRunContentWithCertificateErrors( |
| 4211 const blink::WebURL& url, | 4209 const blink::WebURL& url, |
| 4212 const blink::WebCString& security_info) { | 4210 const blink::WebCString& security_info) { |
| 4213 if (IsContentWithCertificateErrorsRelevantToUI(frame_, url, security_info)) { | 4211 if (IsContentWithCertificateErrorsRelevantToUI(frame_, url, security_info)) |
| 4214 Send(new FrameHostMsg_DidRunContentWithCertificateErrors(routing_id_, url, | 4212 Send(new FrameHostMsg_DidRunContentWithCertificateErrors(routing_id_, url)); |
| 4215 security_info)); | |
| 4216 } | |
| 4217 } | 4213 } |
| 4218 | 4214 |
| 4219 void RenderFrameImpl::didChangePerformanceTiming() { | 4215 void RenderFrameImpl::didChangePerformanceTiming() { |
| 4220 FOR_EACH_OBSERVER(RenderFrameObserver, | 4216 FOR_EACH_OBSERVER(RenderFrameObserver, |
| 4221 observers_, | 4217 observers_, |
| 4222 DidChangePerformanceTiming()); | 4218 DidChangePerformanceTiming()); |
| 4223 } | 4219 } |
| 4224 | 4220 |
| 4225 void RenderFrameImpl::didObserveLoadingBehavior( | 4221 void RenderFrameImpl::didObserveLoadingBehavior( |
| 4226 blink::WebLoadingBehaviorFlag behavior) { | 4222 blink::WebLoadingBehaviorFlag behavior) { |
| (...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6337 // event target. Potentially a Pepper plugin will receive the event. | 6333 // event target. Potentially a Pepper plugin will receive the event. |
| 6338 // In order to tell whether a plugin gets the last mouse event and which it | 6334 // In order to tell whether a plugin gets the last mouse event and which it |
| 6339 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6335 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6340 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6336 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6341 // |pepper_last_mouse_event_target_|. | 6337 // |pepper_last_mouse_event_target_|. |
| 6342 pepper_last_mouse_event_target_ = nullptr; | 6338 pepper_last_mouse_event_target_ = nullptr; |
| 6343 #endif | 6339 #endif |
| 6344 } | 6340 } |
| 6345 | 6341 |
| 6346 } // namespace content | 6342 } // namespace content |
| OLD | NEW |