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 4034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4045 extra_data->set_allow_download( | 4045 extra_data->set_allow_download( |
4046 navigation_state->common_params().allow_download); | 4046 navigation_state->common_params().allow_download); |
4047 extra_data->set_transition_type(transition_type); | 4047 extra_data->set_transition_type(transition_type); |
4048 extra_data->set_should_replace_current_entry(should_replace_current_entry); | 4048 extra_data->set_should_replace_current_entry(should_replace_current_entry); |
4049 extra_data->set_transferred_request_child_id( | 4049 extra_data->set_transferred_request_child_id( |
4050 navigation_state->start_params().transferred_request_child_id); | 4050 navigation_state->start_params().transferred_request_child_id); |
4051 extra_data->set_transferred_request_request_id( | 4051 extra_data->set_transferred_request_request_id( |
4052 navigation_state->start_params().transferred_request_request_id); | 4052 navigation_state->start_params().transferred_request_request_id); |
4053 extra_data->set_service_worker_provider_id(provider_id); | 4053 extra_data->set_service_worker_provider_id(provider_id); |
4054 extra_data->set_stream_override(std::move(stream_override)); | 4054 extra_data->set_stream_override(std::move(stream_override)); |
| 4055 bool is_prefetch = |
| 4056 GetContentClient()->renderer()->IsPrefetchOnly(this, request); |
| 4057 extra_data->set_is_prefetch(is_prefetch); |
| 4058 extra_data->set_download_to_network_cache_only( |
| 4059 is_prefetch && |
| 4060 WebURLRequestToResourceType(request) != RESOURCE_TYPE_MAIN_FRAME); |
4055 WebString error; | 4061 WebString error; |
4056 extra_data->set_initiated_in_secure_context( | 4062 extra_data->set_initiated_in_secure_context( |
4057 frame->document().isSecureContext(error)); | 4063 frame->document().isSecureContext(error)); |
4058 request.setExtraData(extra_data); | 4064 request.setExtraData(extra_data); |
4059 | 4065 |
4060 if (request.getLoFiState() == WebURLRequest::LoFiUnspecified) { | 4066 if (request.getLoFiState() == WebURLRequest::LoFiUnspecified) { |
4061 if (is_main_frame_ && !navigation_state->request_committed()) { | 4067 if (is_main_frame_ && !navigation_state->request_committed()) { |
4062 request.setLoFiState(static_cast<WebURLRequest::LoFiState>( | 4068 request.setLoFiState(static_cast<WebURLRequest::LoFiState>( |
4063 navigation_state->common_params().lofi_state)); | 4069 navigation_state->common_params().lofi_state)); |
4064 } else { | 4070 } else { |
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6332 // event target. Potentially a Pepper plugin will receive the event. | 6338 // event target. Potentially a Pepper plugin will receive the event. |
6333 // In order to tell whether a plugin gets the last mouse event and which it | 6339 // In order to tell whether a plugin gets the last mouse event and which it |
6334 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6340 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6335 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6341 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6336 // |pepper_last_mouse_event_target_|. | 6342 // |pepper_last_mouse_event_target_|. |
6337 pepper_last_mouse_event_target_ = nullptr; | 6343 pepper_last_mouse_event_target_ = nullptr; |
6338 #endif | 6344 #endif |
6339 } | 6345 } |
6340 | 6346 |
6341 } // namespace content | 6347 } // namespace content |
OLD | NEW |