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 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4018 extra_data->set_transferred_request_request_id( | 4018 extra_data->set_transferred_request_request_id( |
4019 navigation_state->start_params().transferred_request_request_id); | 4019 navigation_state->start_params().transferred_request_request_id); |
4020 extra_data->set_service_worker_provider_id(provider_id); | 4020 extra_data->set_service_worker_provider_id(provider_id); |
4021 extra_data->set_stream_override(std::move(stream_override)); | 4021 extra_data->set_stream_override(std::move(stream_override)); |
4022 if (request.getLoFiState() != WebURLRequest::LoFiUnspecified) | 4022 if (request.getLoFiState() != WebURLRequest::LoFiUnspecified) |
4023 extra_data->set_lofi_state(static_cast<LoFiState>(request.getLoFiState())); | 4023 extra_data->set_lofi_state(static_cast<LoFiState>(request.getLoFiState())); |
4024 else if (is_main_frame_ && !navigation_state->request_committed()) | 4024 else if (is_main_frame_ && !navigation_state->request_committed()) |
4025 extra_data->set_lofi_state(navigation_state->common_params().lofi_state); | 4025 extra_data->set_lofi_state(navigation_state->common_params().lofi_state); |
4026 else | 4026 else |
4027 extra_data->set_lofi_state(is_using_lofi_ ? LOFI_ON : LOFI_OFF); | 4027 extra_data->set_lofi_state(is_using_lofi_ ? LOFI_ON : LOFI_OFF); |
| 4028 WebString error; |
| 4029 extra_data->set_initiated_in_secure_context( |
| 4030 frame->document().isSecureContext(error)); |
4028 request.setExtraData(extra_data); | 4031 request.setExtraData(extra_data); |
4029 | 4032 |
4030 // TODO(creis): Update prefetching to work with out-of-process iframes. | 4033 // TODO(creis): Update prefetching to work with out-of-process iframes. |
4031 WebFrame* top_frame = frame->top(); | 4034 WebFrame* top_frame = frame->top(); |
4032 if (top_frame && top_frame->isWebLocalFrame()) { | 4035 if (top_frame && top_frame->isWebLocalFrame()) { |
4033 DocumentState* top_document_state = | 4036 DocumentState* top_document_state = |
4034 DocumentState::FromDataSource(top_frame->dataSource()); | 4037 DocumentState::FromDataSource(top_frame->dataSource()); |
4035 if (top_document_state) { | 4038 if (top_document_state) { |
4036 // TODO(gavinp): separate out prefetching and prerender field trials | 4039 // TODO(gavinp): separate out prefetching and prerender field trials |
4037 // if the rel=prerender rel type is sticking around. | 4040 // if the rel=prerender rel type is sticking around. |
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6235 // event target. Potentially a Pepper plugin will receive the event. | 6238 // event target. Potentially a Pepper plugin will receive the event. |
6236 // In order to tell whether a plugin gets the last mouse event and which it | 6239 // In order to tell whether a plugin gets the last mouse event and which it |
6237 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6240 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6238 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6241 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6239 // |pepper_last_mouse_event_target_|. | 6242 // |pepper_last_mouse_event_target_|. |
6240 pepper_last_mouse_event_target_ = nullptr; | 6243 pepper_last_mouse_event_target_ = nullptr; |
6241 #endif | 6244 #endif |
6242 } | 6245 } |
6243 | 6246 |
6244 } // namespace content | 6247 } // namespace content |
OLD | NEW |