| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 789     UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Intent", | 789     UMA_HISTOGRAM_CUSTOM_TIMES("Navigation.UI_OnLoadComplete.Intent", | 
| 790                                base::TimeTicks::Now() - ui_timestamp, | 790                                base::TimeTicks::Now() - ui_timestamp, | 
| 791                                base::TimeDelta::FromMilliseconds(10), | 791                                base::TimeDelta::FromMilliseconds(10), | 
| 792                                base::TimeDelta::FromMinutes(10), 100); | 792                                base::TimeDelta::FromMinutes(10), 100); | 
| 793   } | 793   } | 
| 794   // This message is only sent for top-level frames. TODO(avi): when frame tree | 794   // This message is only sent for top-level frames. TODO(avi): when frame tree | 
| 795   // mirroring works correctly, add a check here to enforce it. | 795   // mirroring works correctly, add a check here to enforce it. | 
| 796   delegate_->DocumentOnLoadCompleted(this); | 796   delegate_->DocumentOnLoadCompleted(this); | 
| 797 } | 797 } | 
| 798 | 798 | 
| 799 void RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame(const GURL& url) { | 799 void RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame( | 
| 800   frame_tree_node_->navigator()->DidStartProvisionalLoad( | 800     const GURL& url, | 
| 801       this, url); | 801     const base::TimeTicks& navigation_start) { | 
|  | 802   frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, | 
|  | 803                                                          navigation_start); | 
| 802 } | 804 } | 
| 803 | 805 | 
| 804 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( | 806 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( | 
| 805     const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 807     const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 
| 806   if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 808   if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 
| 807           switches::kEnableBrowserSideNavigation) && | 809           switches::kEnableBrowserSideNavigation) && | 
| 808       navigation_handle_) { | 810       navigation_handle_) { | 
| 809     navigation_handle_->set_net_error_code( | 811     navigation_handle_->set_net_error_code( | 
| 810         static_cast<net::Error>(params.error_code)); | 812         static_cast<net::Error>(params.error_code)); | 
| 811   } | 813   } | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 931   if (navigation_handle_ && | 933   if (navigation_handle_ && | 
| 932       navigation_handle_->GetURL() != validated_params.url) { | 934       navigation_handle_->GetURL() != validated_params.url) { | 
| 933     navigation_handle_.reset(); | 935     navigation_handle_.reset(); | 
| 934   } | 936   } | 
| 935 | 937 | 
| 936   // Synchronous renderer-initiated navigations will send a | 938   // Synchronous renderer-initiated navigations will send a | 
| 937   // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad | 939   // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad | 
| 938   // message. | 940   // message. | 
| 939   if (!navigation_handle_) { | 941   if (!navigation_handle_) { | 
| 940     navigation_handle_ = NavigationHandleImpl::Create( | 942     navigation_handle_ = NavigationHandleImpl::Create( | 
| 941         validated_params.url, frame_tree_node_); | 943         validated_params.url, frame_tree_node_, base::TimeTicks::Now()); | 
| 942   } | 944   } | 
| 943 | 945 | 
| 944   accessibility_reset_count_ = 0; | 946   accessibility_reset_count_ = 0; | 
| 945   frame_tree_node()->navigator()->DidNavigate(this, validated_params); | 947   frame_tree_node()->navigator()->DidNavigate(this, validated_params); | 
| 946 | 948 | 
| 947   // For a top-level frame, there are potential security concerns associated | 949   // For a top-level frame, there are potential security concerns associated | 
| 948   // with displaying graphics from a previously loaded page after the URL in | 950   // with displaying graphics from a previously loaded page after the URL in | 
| 949   // the omnibar has been changed. It is unappealing to clear the page | 951   // the omnibar has been changed. It is unappealing to clear the page | 
| 950   // immediately, but if the renderer is taking a long time to issue any | 952   // immediately, but if the renderer is taking a long time to issue any | 
| 951   // compositor output (possibly because of script deliberately creating this | 953   // compositor output (possibly because of script deliberately creating this | 
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2340   *dst = src; | 2342   *dst = src; | 
| 2341 | 2343 | 
| 2342   if (src.routing_id != -1) | 2344   if (src.routing_id != -1) | 
| 2343     dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2345     dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 
| 2344 | 2346 | 
| 2345   if (src.parent_routing_id != -1) | 2347   if (src.parent_routing_id != -1) | 
| 2346     dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2348     dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 
| 2347 } | 2349 } | 
| 2348 | 2350 | 
| 2349 }  // namespace content | 2351 }  // namespace content | 
| OLD | NEW | 
|---|