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 <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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 795 |
796 void RenderFrameHostImpl::OnDetach() { | 796 void RenderFrameHostImpl::OnDetach() { |
797 frame_tree_->RemoveFrame(frame_tree_node_); | 797 frame_tree_->RemoveFrame(frame_tree_node_); |
798 } | 798 } |
799 | 799 |
800 void RenderFrameHostImpl::OnFrameFocused() { | 800 void RenderFrameHostImpl::OnFrameFocused() { |
801 frame_tree_->SetFocusedFrame(frame_tree_node_); | 801 frame_tree_->SetFocusedFrame(frame_tree_node_); |
802 } | 802 } |
803 | 803 |
804 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { | 804 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| 805 if (params.is_history_navigation_in_new_child) { |
| 806 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| 807 |
| 808 // Try to find a FrameNavigationEntry that matches this frame instead, based |
| 809 // on the frame's unique name. If this can't be found, fall back to the |
| 810 // default params using OpenURL below. |
| 811 if (frame_tree_node_->navigator()->NavigateNewChildFrame( |
| 812 this, params.frame_unique_name)) |
| 813 return; |
| 814 } |
| 815 |
805 OpenURL(params, GetSiteInstance()); | 816 OpenURL(params, GetSiteInstance()); |
806 } | 817 } |
807 | 818 |
808 void RenderFrameHostImpl::OnDocumentOnLoadCompleted( | 819 void RenderFrameHostImpl::OnDocumentOnLoadCompleted( |
809 FrameMsg_UILoadMetricsReportType::Value report_type, | 820 FrameMsg_UILoadMetricsReportType::Value report_type, |
810 base::TimeTicks ui_timestamp) { | 821 base::TimeTicks ui_timestamp) { |
811 if (report_type == FrameMsg_UILoadMetricsReportType::REPORT_LINK) { | 822 if (report_type == FrameMsg_UILoadMetricsReportType::REPORT_LINK) { |
812 UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Link", | 823 UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Link", |
813 base::TimeTicks::Now() - ui_timestamp, | 824 base::TimeTicks::Now() - ui_timestamp, |
814 base::TimeDelta::FromMilliseconds(10), | 825 base::TimeDelta::FromMilliseconds(10), |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2391 *dst = src; | 2402 *dst = src; |
2392 | 2403 |
2393 if (src.routing_id != -1) | 2404 if (src.routing_id != -1) |
2394 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2405 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2395 | 2406 |
2396 if (src.parent_routing_id != -1) | 2407 if (src.parent_routing_id != -1) |
2397 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2408 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2398 } | 2409 } |
2399 | 2410 |
2400 } // namespace content | 2411 } // namespace content |
OLD | NEW |