Chromium Code Reviews| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1609 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); | 1609 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); |
| 1610 } | 1610 } |
| 1611 | 1611 |
| 1612 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, | 1612 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, |
| 1613 SiteInstance* source_site_instance) { | 1613 SiteInstance* source_site_instance) { |
| 1614 GURL validated_url(params.url); | 1614 GURL validated_url(params.url); |
| 1615 GetProcess()->FilterURL(false, &validated_url); | 1615 GetProcess()->FilterURL(false, &validated_url); |
| 1616 | 1616 |
| 1617 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", | 1617 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
| 1618 validated_url.possibly_invalid_spec()); | 1618 validated_url.possibly_invalid_spec()); |
| 1619 ui::PageTransition transition = ui::PAGE_TRANSITION_LINK; | |
| 1620 if (frame_tree_node_->parent()) { | |
| 1621 transition = params.should_replace_current_entry | |
|
Charlie Reis
2015/04/22 20:44:57
Maybe we should be preserving the actual transitio
Nate Chapin
2015/04/22 21:59:23
That doesn't really work, because the NavigationSt
Charlie Reis
2015/04/22 22:04:29
Ok. I'll defer on this, since we should be able t
| |
| 1622 ? ui::PAGE_TRANSITION_AUTO_SUBFRAME | |
| 1623 : ui::PAGE_TRANSITION_MANUAL_SUBFRAME; | |
| 1624 } | |
| 1619 frame_tree_node_->navigator()->RequestOpenURL( | 1625 frame_tree_node_->navigator()->RequestOpenURL( |
| 1620 this, validated_url, source_site_instance, params.referrer, | 1626 this, validated_url, source_site_instance, params.referrer, transition, |
| 1621 params.disposition, params.should_replace_current_entry, | 1627 params.disposition, params.should_replace_current_entry, |
| 1622 params.user_gesture); | 1628 params.user_gesture); |
| 1623 } | 1629 } |
| 1624 | 1630 |
| 1625 void RenderFrameHostImpl::Stop() { | 1631 void RenderFrameHostImpl::Stop() { |
| 1626 Send(new FrameMsg_Stop(routing_id_)); | 1632 Send(new FrameMsg_Stop(routing_id_)); |
| 1627 } | 1633 } |
| 1628 | 1634 |
| 1629 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation) { | 1635 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation) { |
| 1630 // TODO(creis): Support beforeunload on subframes. For now just pretend that | 1636 // TODO(creis): Support beforeunload on subframes. For now just pretend that |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2001 return; | 2007 return; |
| 2002 | 2008 |
| 2003 permission_manager->RegisterPermissionUsage( | 2009 permission_manager->RegisterPermissionUsage( |
| 2004 PermissionType::GEOLOCATION, | 2010 PermissionType::GEOLOCATION, |
| 2005 GetLastCommittedURL().GetOrigin(), | 2011 GetLastCommittedURL().GetOrigin(), |
| 2006 frame_tree_node()->frame_tree()->GetMainFrame() | 2012 frame_tree_node()->frame_tree()->GetMainFrame() |
| 2007 ->GetLastCommittedURL().GetOrigin()); | 2013 ->GetLastCommittedURL().GetOrigin()); |
| 2008 } | 2014 } |
| 2009 | 2015 |
| 2010 } // namespace content | 2016 } // namespace content |
| OLD | NEW |