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 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4062 extra_data->set_allow_download( | 4062 extra_data->set_allow_download( |
4063 navigation_state->common_params().allow_download); | 4063 navigation_state->common_params().allow_download); |
4064 extra_data->set_transition_type(transition_type); | 4064 extra_data->set_transition_type(transition_type); |
4065 extra_data->set_should_replace_current_entry(should_replace_current_entry); | 4065 extra_data->set_should_replace_current_entry(should_replace_current_entry); |
4066 extra_data->set_transferred_request_child_id( | 4066 extra_data->set_transferred_request_child_id( |
4067 navigation_state->start_params().transferred_request_child_id); | 4067 navigation_state->start_params().transferred_request_child_id); |
4068 extra_data->set_transferred_request_request_id( | 4068 extra_data->set_transferred_request_request_id( |
4069 navigation_state->start_params().transferred_request_request_id); | 4069 navigation_state->start_params().transferred_request_request_id); |
4070 extra_data->set_service_worker_provider_id(provider_id); | 4070 extra_data->set_service_worker_provider_id(provider_id); |
4071 extra_data->set_stream_override(std::move(stream_override)); | 4071 extra_data->set_stream_override(std::move(stream_override)); |
4072 bool is_prefetch = frame->document().isPrefetchOnly(); | |
4073 extra_data->set_is_prefetch(is_prefetch); | |
4074 extra_data->set_download_to_network_cache_only( | |
4075 is_prefetch && | |
4076 WebURLRequestToResourceType(request) != RESOURCE_TYPE_MAIN_FRAME); | |
mattcary
2016/08/29 09:27:54
Why do we not set this for main frame resources?
droger
2016/08/29 09:32:42
This flags prevents the responses from going back
droger
2016/08/29 09:35:55
Basically I use this to distinguish the main HTML
clamy
2016/08/30 18:16:13
Do we want iframes to also be downloaded to cache?
droger
2016/09/01 09:37:32
For now we want to only let the main request go th
clamy
2016/09/01 18:30:25
Could you add a comment explaining this? This way
| |
4072 WebString error; | 4077 WebString error; |
4073 extra_data->set_initiated_in_secure_context( | 4078 extra_data->set_initiated_in_secure_context( |
4074 frame->document().isSecureContext(error)); | 4079 frame->document().isSecureContext(error)); |
4075 request.setExtraData(extra_data); | 4080 request.setExtraData(extra_data); |
4076 | 4081 |
4077 if (request.getLoFiState() == WebURLRequest::LoFiUnspecified) { | 4082 if (request.getLoFiState() == WebURLRequest::LoFiUnspecified) { |
4078 if (is_main_frame_ && !navigation_state->request_committed()) { | 4083 if (is_main_frame_ && !navigation_state->request_committed()) { |
4079 request.setLoFiState(static_cast<WebURLRequest::LoFiState>( | 4084 request.setLoFiState(static_cast<WebURLRequest::LoFiState>( |
4080 navigation_state->common_params().lofi_state)); | 4085 navigation_state->common_params().lofi_state)); |
4081 } else { | 4086 } else { |
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6348 // event target. Potentially a Pepper plugin will receive the event. | 6353 // event target. Potentially a Pepper plugin will receive the event. |
6349 // In order to tell whether a plugin gets the last mouse event and which it | 6354 // In order to tell whether a plugin gets the last mouse event and which it |
6350 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6355 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6351 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6356 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6352 // |pepper_last_mouse_event_target_|. | 6357 // |pepper_last_mouse_event_target_|. |
6353 pepper_last_mouse_event_target_ = nullptr; | 6358 pepper_last_mouse_event_target_ = nullptr; |
6354 #endif | 6359 #endif |
6355 } | 6360 } |
6356 | 6361 |
6357 } // namespace content | 6362 } // namespace content |
OLD | NEW |