OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy_host.h" | 5 #include "content/browser/frame_host/render_frame_proxy_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "content/browser/bad_message.h" | 10 #include "content/browser/bad_message.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host(); | 244 RenderFrameHostImpl* current_rfh = frame_tree_node_->current_frame_host(); |
245 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance())) | 245 if (!site_instance_->IsRelatedSiteInstance(current_rfh->GetSiteInstance())) |
246 return; | 246 return; |
247 | 247 |
248 // Since this navigation targeted a specific RenderFrameProxy, it should stay | 248 // Since this navigation targeted a specific RenderFrameProxy, it should stay |
249 // in the current tab. | 249 // in the current tab. |
250 DCHECK_EQ(CURRENT_TAB, params.disposition); | 250 DCHECK_EQ(CURRENT_TAB, params.disposition); |
251 | 251 |
252 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be | 252 // TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be |
253 // passed in as well. | 253 // passed in as well. |
254 // TODO(lukasza): https://crbug.com/344348: Plumb through POST data | |
255 // (and a non-null NavigationHandle?). | |
clamy
2016/05/19 16:08:00
See my comment in RequestTransferURL in favor of n
Łukasz Anforowicz
2016/05/19 18:06:59
Done.
| |
254 frame_tree_node_->navigator()->RequestTransferURL( | 256 frame_tree_node_->navigator()->RequestTransferURL( |
255 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(), | 257 current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(), |
256 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(), | 258 params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(), |
257 params.should_replace_current_entry); | 259 params.should_replace_current_entry, nullptr); |
258 } | 260 } |
259 | 261 |
260 void RenderFrameProxyHost::OnRouteMessageEvent( | 262 void RenderFrameProxyHost::OnRouteMessageEvent( |
261 const FrameMsg_PostMessage_Params& params) { | 263 const FrameMsg_PostMessage_Params& params) { |
262 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host(); | 264 RenderFrameHostImpl* target_rfh = frame_tree_node()->current_frame_host(); |
263 | 265 |
264 // Only deliver the message if the request came from a RenderFrameHost in the | 266 // Only deliver the message if the request came from a RenderFrameHost in the |
265 // same BrowsingInstance or if this WebContents is dedicated to a browser | 267 // same BrowsingInstance or if this WebContents is dedicated to a browser |
266 // plugin guest. | 268 // plugin guest. |
267 // | 269 // |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, | 360 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, |
359 source_proxy_routing_id)); | 361 source_proxy_routing_id)); |
360 } | 362 } |
361 | 363 |
362 void RenderFrameProxyHost::OnFrameFocused() { | 364 void RenderFrameProxyHost::OnFrameFocused() { |
363 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, | 365 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, |
364 GetSiteInstance()); | 366 GetSiteInstance()); |
365 } | 367 } |
366 | 368 |
367 } // namespace content | 369 } // namespace content |
OLD | NEW |