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

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

Issue 1422333009: OOPIF: History navigations for new child frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comment. Created 5 years 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 804
805 void RenderFrameHostImpl::OnDetach() { 805 void RenderFrameHostImpl::OnDetach() {
806 frame_tree_->RemoveFrame(frame_tree_node_); 806 frame_tree_->RemoveFrame(frame_tree_node_);
807 } 807 }
808 808
809 void RenderFrameHostImpl::OnFrameFocused() { 809 void RenderFrameHostImpl::OnFrameFocused() {
810 frame_tree_->SetFocusedFrame(frame_tree_node_); 810 frame_tree_->SetFocusedFrame(frame_tree_node_);
811 } 811 }
812 812
813 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { 813 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) {
814 if (params.is_history_navigation_in_new_child) {
815 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
816
817 // Try to find a FrameNavigationEntry that matches this frame instead, based
818 // on the frame's unique name. If this can't be found, fall back to the
819 // default params using OpenURL below.
820 if (frame_tree_node_->navigator()->NavigateNewChildFrame(
821 this, params.frame_unique_name))
822 return;
823 }
824
814 OpenURL(params, GetSiteInstance()); 825 OpenURL(params, GetSiteInstance());
815 } 826 }
816 827
817 void RenderFrameHostImpl::OnDocumentOnLoadCompleted( 828 void RenderFrameHostImpl::OnDocumentOnLoadCompleted(
818 FrameMsg_UILoadMetricsReportType::Value report_type, 829 FrameMsg_UILoadMetricsReportType::Value report_type,
819 base::TimeTicks ui_timestamp) { 830 base::TimeTicks ui_timestamp) {
820 if (report_type == FrameMsg_UILoadMetricsReportType::REPORT_LINK) { 831 if (report_type == FrameMsg_UILoadMetricsReportType::REPORT_LINK) {
821 UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Link", 832 UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Link",
822 base::TimeTicks::Now() - ui_timestamp, 833 base::TimeTicks::Now() - ui_timestamp,
823 base::TimeDelta::FromMilliseconds(10), 834 base::TimeDelta::FromMilliseconds(10),
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 *dst = src; 2503 *dst = src;
2493 2504
2494 if (src.routing_id != -1) 2505 if (src.routing_id != -1)
2495 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2506 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2496 2507
2497 if (src.parent_routing_id != -1) 2508 if (src.parent_routing_id != -1)
2498 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2509 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2499 } 2510 }
2500 2511
2501 } // namespace content 2512 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698