| 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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 frame_tree_->RemoveFrame(frame_tree_node_); | 1223 frame_tree_->RemoveFrame(frame_tree_node_); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 void RenderFrameHostImpl::OnFrameFocused() { | 1226 void RenderFrameHostImpl::OnFrameFocused() { |
| 1227 delegate_->SetFocusedFrame(frame_tree_node_, GetSiteInstance()); | 1227 delegate_->SetFocusedFrame(frame_tree_node_, GetSiteInstance()); |
| 1228 } | 1228 } |
| 1229 | 1229 |
| 1230 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { | 1230 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| 1231 GURL validated_url(params.url); | 1231 GURL validated_url(params.url); |
| 1232 GetProcess()->FilterURL(false, &validated_url); | 1232 GetProcess()->FilterURL(false, &validated_url); |
| 1233 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadRequestBody( |
| 1234 GetSiteInstance(), params.resource_request_body)) { |
| 1235 bad_message::ReceivedBadMessage(GetProcess(), |
| 1236 bad_message::RFH_ILLEGAL_UPLOAD_PARAMS); |
| 1237 return; |
| 1238 } |
| 1233 | 1239 |
| 1234 if (params.is_history_navigation_in_new_child) { | 1240 if (params.is_history_navigation_in_new_child) { |
| 1235 // Try to find a FrameNavigationEntry that matches this frame instead, based | 1241 // Try to find a FrameNavigationEntry that matches this frame instead, based |
| 1236 // on the frame's unique name. If this can't be found, fall back to the | 1242 // on the frame's unique name. If this can't be found, fall back to the |
| 1237 // default params using RequestOpenURL below. | 1243 // default params using RequestOpenURL below. |
| 1238 if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, | 1244 if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, |
| 1239 validated_url)) | 1245 validated_url)) |
| 1240 return; | 1246 return; |
| 1241 } | 1247 } |
| 1242 | 1248 |
| (...skipping 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4087 } | 4093 } |
| 4088 | 4094 |
| 4089 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 4095 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
| 4090 const std::string& interface_name, | 4096 const std::string& interface_name, |
| 4091 mojo::ScopedMessagePipeHandle pipe) { | 4097 mojo::ScopedMessagePipeHandle pipe) { |
| 4092 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 4098 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
| 4093 } | 4099 } |
| 4094 #endif | 4100 #endif |
| 4095 | 4101 |
| 4096 } // namespace content | 4102 } // namespace content |
| OLD | NEW |