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 3728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3739 const WebURLResponse& web_url_response = frame_->DataSource()->GetResponse(); | 3739 const WebURLResponse& web_url_response = frame_->DataSource()->GetResponse(); |
3740 WebURLResponseExtraDataImpl* extra_data = | 3740 WebURLResponseExtraDataImpl* extra_data = |
3741 GetExtraDataFromResponse(web_url_response); | 3741 GetExtraDataFromResponse(web_url_response); |
3742 // Only update the PreviewsState and effective connection type states for new | 3742 // Only update the PreviewsState and effective connection type states for new |
3743 // main frame documents. Subframes inherit from the main frame and should not | 3743 // main frame documents. Subframes inherit from the main frame and should not |
3744 // change at commit time. | 3744 // change at commit time. |
3745 if (is_main_frame_ && !navigation_state->WasWithinSameDocument()) { | 3745 if (is_main_frame_ && !navigation_state->WasWithinSameDocument()) { |
3746 previews_state_ = | 3746 previews_state_ = |
3747 extra_data ? extra_data->previews_state() : PREVIEWS_OFF; | 3747 extra_data ? extra_data->previews_state() : PREVIEWS_OFF; |
3748 | 3748 |
3749 // Set lite pages off if a lite page was not loaded for the main frame. | |
3750 if (web_url_response | |
3751 .HttpHeaderField( | |
3752 WebString::FromUTF8(kChromeProxyContentTransformHeader)) | |
3753 .Utf8() != kChromeProxyLitePageDirective) { | |
3754 previews_state_ &= ~(SERVER_LITE_PAGE_ON); | |
3755 } | |
3756 | |
3757 if (extra_data) { | 3749 if (extra_data) { |
3758 effective_connection_type_ = | 3750 effective_connection_type_ = |
3759 EffectiveConnectionTypeToWebEffectiveConnectionType( | 3751 EffectiveConnectionTypeToWebEffectiveConnectionType( |
3760 extra_data->effective_connection_type()); | 3752 extra_data->effective_connection_type()); |
3761 } | 3753 } |
3762 } | 3754 } |
3763 | 3755 |
3764 if (proxy_routing_id_ != MSG_ROUTING_NONE) { | 3756 if (proxy_routing_id_ != MSG_ROUTING_NONE) { |
3765 // If this is a provisional frame associated with a proxy (i.e., a frame | 3757 // If this is a provisional frame associated with a proxy (i.e., a frame |
3766 // created for a remote-to-local navigation), swap it into the frame tree | 3758 // created for a remote-to-local navigation), swap it into the frame tree |
(...skipping 3302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7069 policy(info.default_policy), | 7061 policy(info.default_policy), |
7070 replaces_current_history_item(info.replaces_current_history_item), | 7062 replaces_current_history_item(info.replaces_current_history_item), |
7071 history_navigation_in_new_child_frame( | 7063 history_navigation_in_new_child_frame( |
7072 info.is_history_navigation_in_new_child_frame), | 7064 info.is_history_navigation_in_new_child_frame), |
7073 client_redirect(info.is_client_redirect), | 7065 client_redirect(info.is_client_redirect), |
7074 cache_disabled(info.is_cache_disabled), | 7066 cache_disabled(info.is_cache_disabled), |
7075 form(info.form), | 7067 form(info.form), |
7076 source_location(info.source_location) {} | 7068 source_location(info.source_location) {} |
7077 | 7069 |
7078 } // namespace content | 7070 } // namespace content |
OLD | NEW |