| 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 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3925 request.setFirstPartyForCookies(request.url()); | 3925 request.setFirstPartyForCookies(request.url()); |
| 3926 else | 3926 else |
| 3927 request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); | 3927 request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); |
| 3928 } | 3928 } |
| 3929 | 3929 |
| 3930 // Set the requestor origin to the same origin as the frame's document if it | 3930 // Set the requestor origin to the same origin as the frame's document if it |
| 3931 // hasn't yet been set. | 3931 // hasn't yet been set. |
| 3932 // | 3932 // |
| 3933 // TODO(mkwst): It would be cleaner to adjust blink::ResourceRequest to | 3933 // TODO(mkwst): It would be cleaner to adjust blink::ResourceRequest to |
| 3934 // initialize itself with a `nullptr` initiator so that this can be a simple | 3934 // initialize itself with a `nullptr` initiator so that this can be a simple |
| 3935 // `isNull()` check. | 3935 // `isNull()` check. https://crbug.com/625969 |
| 3936 if (request.requestorOrigin().isUnique() && | 3936 if (request.requestorOrigin().isUnique() && |
| 3937 !frame->document().getSecurityOrigin().isUnique()) { | 3937 !frame->document().getSecurityOrigin().isUnique()) { |
| 3938 request.setRequestorOrigin(frame->document().getSecurityOrigin()); | 3938 request.setRequestorOrigin(frame->document().getSecurityOrigin()); |
| 3939 } | 3939 } |
| 3940 | 3940 |
| 3941 WebDataSource* provisional_data_source = frame->provisionalDataSource(); | 3941 WebDataSource* provisional_data_source = frame->provisionalDataSource(); |
| 3942 WebDataSource* data_source = | 3942 WebDataSource* data_source = |
| 3943 provisional_data_source ? provisional_data_source : frame->dataSource(); | 3943 provisional_data_source ? provisional_data_source : frame->dataSource(); |
| 3944 | 3944 |
| 3945 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 3945 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| (...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6328 // event target. Potentially a Pepper plugin will receive the event. | 6328 // event target. Potentially a Pepper plugin will receive the event. |
| 6329 // In order to tell whether a plugin gets the last mouse event and which it | 6329 // In order to tell whether a plugin gets the last mouse event and which it |
| 6330 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6330 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6331 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6331 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6332 // |pepper_last_mouse_event_target_|. | 6332 // |pepper_last_mouse_event_target_|. |
| 6333 pepper_last_mouse_event_target_ = nullptr; | 6333 pepper_last_mouse_event_target_ = nullptr; |
| 6334 #endif | 6334 #endif |
| 6335 } | 6335 } |
| 6336 | 6336 |
| 6337 } // namespace content | 6337 } // namespace content |
| OLD | NEW |