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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const GURL& url); | 109 const GURL& url); |
110 | 110 |
111 // PlzNavigate: if needed, sends a BeforeUnload IPC to the renderer to ask it | 111 // PlzNavigate: if needed, sends a BeforeUnload IPC to the renderer to ask it |
112 // to execute the beforeUnload event. Otherwise, the navigation request will | 112 // to execute the beforeUnload event. Otherwise, the navigation request will |
113 // be started. | 113 // be started. |
114 void RequestNavigation(FrameTreeNode* frame_tree_node, | 114 void RequestNavigation(FrameTreeNode* frame_tree_node, |
115 const NavigationEntryImpl& entry, | 115 const NavigationEntryImpl& entry, |
116 NavigationController::ReloadType reload_type, | 116 NavigationController::ReloadType reload_type, |
117 base::TimeTicks navigation_start); | 117 base::TimeTicks navigation_start); |
118 | 118 |
119 // PlzNavigate: sends the NavigationRequest for |frame_tree_node| to the | |
120 // network stack so that it can start. | |
121 void BeginNavigation(FrameTreeNode* frame_tree_node); | |
122 | |
123 void RecordNavigationMetrics( | 119 void RecordNavigationMetrics( |
124 const LoadCommittedDetails& details, | 120 const LoadCommittedDetails& details, |
125 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, | 121 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, |
126 SiteInstance* site_instance); | 122 SiteInstance* site_instance); |
127 | 123 |
128 // Called when a navigation has started in a main frame, to update the pending | 124 // Called when a navigation has started in a main frame, to update the pending |
129 // NavigationEntry if the controller does not currently have a | 125 // NavigationEntry if the controller does not currently have a |
130 // browser-initiated one. | 126 // browser-initiated one. |
131 void DidStartMainFrameNavigation(const GURL& url, | 127 void DidStartMainFrameNavigation(const GURL& url, |
132 SiteInstanceImpl* site_instance); | 128 SiteInstanceImpl* site_instance); |
133 | 129 |
134 // The NavigationController that will keep track of session history for all | 130 // The NavigationController that will keep track of session history for all |
135 // RenderFrameHost objects using this NavigatorImpl. | 131 // RenderFrameHost objects using this NavigatorImpl. |
136 // TODO(nasko): Move ownership of the NavigationController from | 132 // TODO(nasko): Move ownership of the NavigationController from |
137 // WebContentsImpl to this class. | 133 // WebContentsImpl to this class. |
138 NavigationControllerImpl* controller_; | 134 NavigationControllerImpl* controller_; |
139 | 135 |
140 // Used to notify the object embedding this Navigator about navigation | 136 // Used to notify the object embedding this Navigator about navigation |
141 // events. Can be NULL in tests. | 137 // events. Can be NULL in tests. |
142 NavigatorDelegate* delegate_; | 138 NavigatorDelegate* delegate_; |
143 | 139 |
144 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; | 140 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; |
145 | 141 |
146 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 142 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
147 }; | 143 }; |
148 | 144 |
149 } // namespace content | 145 } // namespace content |
150 | 146 |
151 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 147 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |