| 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 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2094 } | 2094 } |
| 2095 | 2095 |
| 2096 WebDOMMessageEvent msg_event(serialized_script_value, | 2096 WebDOMMessageEvent msg_event(serialized_script_value, |
| 2097 params.source_origin, | 2097 params.source_origin, |
| 2098 source_frame, | 2098 source_frame, |
| 2099 frame_->document(), | 2099 frame_->document(), |
| 2100 channels); | 2100 channels); |
| 2101 frame_->dispatchMessageEventWithOriginCheck(target_origin, msg_event); | 2101 frame_->dispatchMessageEventWithOriginCheck(target_origin, msg_event); |
| 2102 } | 2102 } |
| 2103 | 2103 |
| 2104 void RenderFrameImpl::OnReload(bool ignore_cache) { | 2104 void RenderFrameImpl::OnReload(bool bypass_cache) { |
| 2105 // TODO(crbug.com/599364): Rename |ignore_cache| or change it to enum. | 2105 frame_->reload(bypass_cache ? WebFrameLoadType::ReloadBypassingCache |
| 2106 // Eventually we may remove FrameMsg_Reload, and use FrameMsg_Navigate. | |
| 2107 frame_->reload(ignore_cache ? WebFrameLoadType::ReloadBypassingCache | |
| 2108 : WebFrameLoadType::Reload); | 2106 : WebFrameLoadType::Reload); |
| 2109 } | 2107 } |
| 2110 | 2108 |
| 2111 void RenderFrameImpl::OnReloadLoFiImages() { | 2109 void RenderFrameImpl::OnReloadLoFiImages() { |
| 2112 is_using_lofi_ = false; | 2110 is_using_lofi_ = false; |
| 2113 GetWebFrame()->reloadLoFiImages(); | 2111 GetWebFrame()->reloadLoFiImages(); |
| 2114 } | 2112 } |
| 2115 | 2113 |
| 2116 void RenderFrameImpl::OnTextSurroundingSelectionRequest(uint32_t max_length) { | 2114 void RenderFrameImpl::OnTextSurroundingSelectionRequest(uint32_t max_length) { |
| 2117 blink::WebSurroundingText surroundingText; | 2115 blink::WebSurroundingText surroundingText; |
| (...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5295 // PlzNavigate: Make sure that Blink's loader will not try to use browser side | 5293 // PlzNavigate: Make sure that Blink's loader will not try to use browser side |
| 5296 // navigation for this request (since it already went to the browser). | 5294 // navigation for this request (since it already went to the browser). |
| 5297 if (browser_side_navigation) | 5295 if (browser_side_navigation) |
| 5298 request.setCheckForBrowserSideNavigation(false); | 5296 request.setCheckForBrowserSideNavigation(false); |
| 5299 | 5297 |
| 5300 // If we are reloading, then use the history state of the current frame. | 5298 // If we are reloading, then use the history state of the current frame. |
| 5301 // Otherwise, if we have history state, then we need to navigate to it, which | 5299 // Otherwise, if we have history state, then we need to navigate to it, which |
| 5302 // corresponds to a back/forward navigation event. Update the parameters | 5300 // corresponds to a back/forward navigation event. Update the parameters |
| 5303 // depending on the navigation type. | 5301 // depending on the navigation type. |
| 5304 if (is_reload) { | 5302 if (is_reload) { |
| 5305 bool ignore_cache = (common_params.navigation_type == | 5303 bool bypass_cache = (common_params.navigation_type == |
| 5306 FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE); | 5304 FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE); |
| 5307 load_type = ignore_cache ? WebFrameLoadType::ReloadBypassingCache | 5305 load_type = bypass_cache ? WebFrameLoadType::ReloadBypassingCache |
| 5308 : WebFrameLoadType::Reload; | 5306 : WebFrameLoadType::Reload; |
| 5309 | 5307 |
| 5310 if (!browser_side_navigation) { | 5308 if (!browser_side_navigation) { |
| 5311 const GURL override_url = | 5309 const GURL override_url = |
| 5312 (common_params.navigation_type == | 5310 (common_params.navigation_type == |
| 5313 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) | 5311 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) |
| 5314 ? common_params.url | 5312 ? common_params.url |
| 5315 : GURL(); | 5313 : GURL(); |
| 5316 request = frame_->requestForReload(load_type, override_url); | 5314 request = frame_->requestForReload(load_type, override_url); |
| 5317 } | 5315 } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6029 int match_count, | 6027 int match_count, |
| 6030 int ordinal, | 6028 int ordinal, |
| 6031 const WebRect& selection_rect, | 6029 const WebRect& selection_rect, |
| 6032 bool final_status_update) { | 6030 bool final_status_update) { |
| 6033 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6031 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6034 selection_rect, ordinal, | 6032 selection_rect, ordinal, |
| 6035 final_status_update)); | 6033 final_status_update)); |
| 6036 } | 6034 } |
| 6037 | 6035 |
| 6038 } // namespace content | 6036 } // namespace content |
| OLD | NEW |