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 3946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3957 // in order to send a larger data url to save a image for <canvas> or <img>. | 3957 // in order to send a larger data url to save a image for <canvas> or <img>. |
3958 if (data_url.length() < kMaxLengthOfDataURLString) { | 3958 if (data_url.length() < kMaxLengthOfDataURLString) { |
3959 Send(new FrameHostMsg_SaveImageFromDataURL( | 3959 Send(new FrameHostMsg_SaveImageFromDataURL( |
3960 render_view_->GetRoutingID(), routing_id_, data_url.utf8())); | 3960 render_view_->GetRoutingID(), routing_id_, data_url.utf8())); |
3961 } | 3961 } |
3962 } | 3962 } |
3963 | 3963 |
3964 void RenderFrameImpl::willSendRequest(blink::WebLocalFrame* frame, | 3964 void RenderFrameImpl::willSendRequest(blink::WebLocalFrame* frame, |
3965 blink::WebURLRequest& request) { | 3965 blink::WebURLRequest& request) { |
3966 DCHECK_EQ(frame_, frame); | 3966 DCHECK_EQ(frame_, frame); |
3967 // The request my be empty during tests. | |
3968 if (request.url().isEmpty()) | |
3969 return; | |
3970 | 3967 |
3971 // Set the first party for cookies url if it has not been set yet (new | 3968 // Set the first party for cookies url if it has not been set yet (new |
3972 // requests). This value will be updated during redirects, consistent with | 3969 // requests). This value will be updated during redirects, consistent with |
3973 // https://tools.ietf.org/html/draft-west-first-party-cookies-04#section-2.1.1 | 3970 // https://tools.ietf.org/html/draft-west-first-party-cookies-04#section-2.1.1 |
3974 if (request.firstPartyForCookies().isEmpty()) { | 3971 if (request.firstPartyForCookies().isEmpty()) { |
3975 if (request.getFrameType() == blink::WebURLRequest::FrameTypeTopLevel) | 3972 if (request.getFrameType() == blink::WebURLRequest::FrameTypeTopLevel) |
3976 request.setFirstPartyForCookies(request.url()); | 3973 request.setFirstPartyForCookies(request.url()); |
3977 else | 3974 else |
3978 request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); | 3975 request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); |
3979 } | 3976 } |
(...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6430 // event target. Potentially a Pepper plugin will receive the event. | 6427 // event target. Potentially a Pepper plugin will receive the event. |
6431 // In order to tell whether a plugin gets the last mouse event and which it | 6428 // In order to tell whether a plugin gets the last mouse event and which it |
6432 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6429 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6433 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6430 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6434 // |pepper_last_mouse_event_target_|. | 6431 // |pepper_last_mouse_event_target_|. |
6435 pepper_last_mouse_event_target_ = nullptr; | 6432 pepper_last_mouse_event_target_ = nullptr; |
6436 #endif | 6433 #endif |
6437 } | 6434 } |
6438 | 6435 |
6439 } // namespace content | 6436 } // namespace content |
OLD | NEW |