| 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 3905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3916 extra_data->set_transferred_request_request_id( | 3916 extra_data->set_transferred_request_request_id( |
| 3917 navigation_state->start_params().transferred_request_request_id); | 3917 navigation_state->start_params().transferred_request_request_id); |
| 3918 extra_data->set_service_worker_provider_id(provider_id); | 3918 extra_data->set_service_worker_provider_id(provider_id); |
| 3919 extra_data->set_stream_override(std::move(stream_override)); | 3919 extra_data->set_stream_override(std::move(stream_override)); |
| 3920 if (request.getLoFiState() != WebURLRequest::LoFiUnspecified) | 3920 if (request.getLoFiState() != WebURLRequest::LoFiUnspecified) |
| 3921 extra_data->set_lofi_state(static_cast<LoFiState>(request.getLoFiState())); | 3921 extra_data->set_lofi_state(static_cast<LoFiState>(request.getLoFiState())); |
| 3922 else if (is_main_frame_ && !navigation_state->request_committed()) | 3922 else if (is_main_frame_ && !navigation_state->request_committed()) |
| 3923 extra_data->set_lofi_state(navigation_state->common_params().lofi_state); | 3923 extra_data->set_lofi_state(navigation_state->common_params().lofi_state); |
| 3924 else | 3924 else |
| 3925 extra_data->set_lofi_state(is_using_lofi_ ? LOFI_ON : LOFI_OFF); | 3925 extra_data->set_lofi_state(is_using_lofi_ ? LOFI_ON : LOFI_OFF); |
| 3926 WebString error; | |
| 3927 extra_data->set_initiated_in_secure_context( | |
| 3928 frame->document().isSecureContext(error)); | |
| 3929 request.setExtraData(extra_data); | 3926 request.setExtraData(extra_data); |
| 3930 | 3927 |
| 3931 // TODO(creis): Update prefetching to work with out-of-process iframes. | 3928 // TODO(creis): Update prefetching to work with out-of-process iframes. |
| 3932 WebFrame* top_frame = frame->top(); | 3929 WebFrame* top_frame = frame->top(); |
| 3933 if (top_frame && top_frame->isWebLocalFrame()) { | 3930 if (top_frame && top_frame->isWebLocalFrame()) { |
| 3934 DocumentState* top_document_state = | 3931 DocumentState* top_document_state = |
| 3935 DocumentState::FromDataSource(top_frame->dataSource()); | 3932 DocumentState::FromDataSource(top_frame->dataSource()); |
| 3936 if (top_document_state) { | 3933 if (top_document_state) { |
| 3937 // TODO(gavinp): separate out prefetching and prerender field trials | 3934 // TODO(gavinp): separate out prefetching and prerender field trials |
| 3938 // if the rel=prerender rel type is sticking around. | 3935 // if the rel=prerender rel type is sticking around. |
| (...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6170 // event target. Potentially a Pepper plugin will receive the event. | 6167 // event target. Potentially a Pepper plugin will receive the event. |
| 6171 // In order to tell whether a plugin gets the last mouse event and which it | 6168 // In order to tell whether a plugin gets the last mouse event and which it |
| 6172 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6169 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6173 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6170 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6174 // |pepper_last_mouse_event_target_|. | 6171 // |pepper_last_mouse_event_target_|. |
| 6175 pepper_last_mouse_event_target_ = nullptr; | 6172 pepper_last_mouse_event_target_ = nullptr; |
| 6176 #endif | 6173 #endif |
| 6177 } | 6174 } |
| 6178 | 6175 |
| 6179 } // namespace content | 6176 } // namespace content |
| OLD | NEW |