| 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/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
| 11 #include "base/time/time.h" |
| 11 #include "content/browser/child_process_security_policy_impl.h" | 12 #include "content/browser/child_process_security_policy_impl.h" |
| 12 #include "content/browser/frame_host/cross_process_frame_connector.h" | 13 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 13 #include "content/browser/frame_host/cross_site_transferring_request.h" | 14 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 14 #include "content/browser/frame_host/frame_tree.h" | 15 #include "content/browser/frame_host/frame_tree.h" |
| 15 #include "content/browser/frame_host/frame_tree_node.h" | 16 #include "content/browser/frame_host/frame_tree_node.h" |
| 16 #include "content/browser/frame_host/navigator.h" | 17 #include "content/browser/frame_host/navigator.h" |
| 17 #include "content/browser/frame_host/render_frame_host_delegate.h" | 18 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 18 #include "content/browser/frame_host/render_frame_proxy_host.h" | 19 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 19 #include "content/browser/renderer_host/input/input_router.h" | 20 #include "content/browser/renderer_host/input/input_router.h" |
| 20 #include "content/browser/renderer_host/input/timeout_monitor.h" | 21 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 | 834 |
| 834 void RenderFrameHostImpl::NavigateToURL(const GURL& url) { | 835 void RenderFrameHostImpl::NavigateToURL(const GURL& url) { |
| 835 FrameMsg_Navigate_Params params; | 836 FrameMsg_Navigate_Params params; |
| 836 params.page_id = -1; | 837 params.page_id = -1; |
| 837 params.pending_history_list_offset = -1; | 838 params.pending_history_list_offset = -1; |
| 838 params.current_history_list_offset = -1; | 839 params.current_history_list_offset = -1; |
| 839 params.current_history_list_length = 0; | 840 params.current_history_list_length = 0; |
| 840 params.url = url; | 841 params.url = url; |
| 841 params.transition = PAGE_TRANSITION_LINK; | 842 params.transition = PAGE_TRANSITION_LINK; |
| 842 params.navigation_type = FrameMsg_Navigate_Type::NORMAL; | 843 params.navigation_type = FrameMsg_Navigate_Type::NORMAL; |
| 844 params.browser_navigation_start = base::TimeTicks::Now(); |
| 843 Navigate(params); | 845 Navigate(params); |
| 844 } | 846 } |
| 845 | 847 |
| 846 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_cross_site_transition) { | 848 void RenderFrameHostImpl::DispatchBeforeUnload(bool for_cross_site_transition) { |
| 847 // TODO(creis): Support subframes. | 849 // TODO(creis): Support subframes. |
| 848 if (!render_view_host_->IsRenderViewLive() || GetParent()) { | 850 if (!render_view_host_->IsRenderViewLive() || GetParent()) { |
| 849 // We don't have a live renderer, so just skip running beforeunload. | 851 // We don't have a live renderer, so just skip running beforeunload. |
| 850 render_view_host_->is_waiting_for_beforeunload_ack_ = true; | 852 render_view_host_->is_waiting_for_beforeunload_ack_ = true; |
| 851 render_view_host_->unload_ack_is_for_cross_site_transition_ = | 853 render_view_host_->unload_ack_is_for_cross_site_transition_ = |
| 852 for_cross_site_transition; | 854 for_cross_site_transition; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 FROM_HERE, | 944 FROM_HERE, |
| 943 base::Bind( | 945 base::Bind( |
| 944 &TransitionRequestManager::SetHasPendingTransitionRequest, | 946 &TransitionRequestManager::SetHasPendingTransitionRequest, |
| 945 base::Unretained(TransitionRequestManager::GetInstance()), | 947 base::Unretained(TransitionRequestManager::GetInstance()), |
| 946 GetProcess()->GetID(), | 948 GetProcess()->GetID(), |
| 947 routing_id_, | 949 routing_id_, |
| 948 has_pending_request)); | 950 has_pending_request)); |
| 949 } | 951 } |
| 950 | 952 |
| 951 } // namespace content | 953 } // namespace content |
| OLD | NEW |