Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1002953004: Ensure we properly set PageTransition for iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix style Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); 1661 Navigate(common_params, StartNavigationParams(), RequestNavigationParams());
1662 } 1662 }
1663 1663
1664 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, 1664 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params,
1665 SiteInstance* source_site_instance) { 1665 SiteInstance* source_site_instance) {
1666 GURL validated_url(params.url); 1666 GURL validated_url(params.url);
1667 GetProcess()->FilterURL(false, &validated_url); 1667 GetProcess()->FilterURL(false, &validated_url);
1668 1668
1669 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", 1669 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url",
1670 validated_url.possibly_invalid_spec()); 1670 validated_url.possibly_invalid_spec());
1671 ui::PageTransition transition = ui::PAGE_TRANSITION_LINK;
1672 if (frame_tree_node_->parent()) {
1673 transition = params.should_replace_current_entry
1674 ? ui::PAGE_TRANSITION_AUTO_SUBFRAME
1675 : ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
1676 }
1671 frame_tree_node_->navigator()->RequestOpenURL( 1677 frame_tree_node_->navigator()->RequestOpenURL(
1672 this, validated_url, source_site_instance, params.referrer, 1678 this, validated_url, source_site_instance, params.referrer, transition,
1673 params.disposition, params.should_replace_current_entry, 1679 params.disposition, params.should_replace_current_entry,
1674 params.user_gesture); 1680 params.user_gesture);
1675 } 1681 }
1676 1682
1677 void RenderFrameHostImpl::Stop() { 1683 void RenderFrameHostImpl::Stop() {
1678 Send(new FrameMsg_Stop(routing_id_)); 1684 Send(new FrameMsg_Stop(routing_id_));
1679 } 1685 }
1680 1686
1681 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation) { 1687 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation) {
1682 // TODO(creis): Support beforeunload on subframes. For now just pretend that 1688 // TODO(creis): Support beforeunload on subframes. For now just pretend that
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 return; 2060 return;
2055 2061
2056 permission_manager->RegisterPermissionUsage( 2062 permission_manager->RegisterPermissionUsage(
2057 PermissionType::GEOLOCATION, 2063 PermissionType::GEOLOCATION,
2058 GetLastCommittedURL().GetOrigin(), 2064 GetLastCommittedURL().GetOrigin(),
2059 frame_tree_node()->frame_tree()->GetMainFrame() 2065 frame_tree_node()->frame_tree()->GetMainFrame()
2060 ->GetLastCommittedURL().GetOrigin()); 2066 ->GetLastCommittedURL().GetOrigin());
2061 } 2067 }
2062 2068
2063 } // namespace content 2069 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698