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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void CommitNavigation(FrameTreeNode* frame_tree_node, | 75 void CommitNavigation(FrameTreeNode* frame_tree_node, |
76 ResourceResponse* response, | 76 ResourceResponse* response, |
77 scoped_ptr<StreamHandle> body) override; | 77 scoped_ptr<StreamHandle> body) override; |
78 void LogResourceRequestTime(base::TimeTicks timestamp, | 78 void LogResourceRequestTime(base::TimeTicks timestamp, |
79 const GURL& url) override; | 79 const GURL& url) override; |
80 void LogBeforeUnloadTime( | 80 void LogBeforeUnloadTime( |
81 const base::TimeTicks& renderer_before_unload_start_time, | 81 const base::TimeTicks& renderer_before_unload_start_time, |
82 const base::TimeTicks& renderer_before_unload_end_time) override; | 82 const base::TimeTicks& renderer_before_unload_end_time) override; |
83 void CancelNavigation(FrameTreeNode* frame_tree_node) override; | 83 void CancelNavigation(FrameTreeNode* frame_tree_node) override; |
84 | 84 |
| 85 // PlzNavigate |
| 86 // Returns the navigation request for a given node. Used in tests. |
| 87 NavigationRequest* GetNavigationRequestForNodeForTesting( |
| 88 FrameTreeNode* frame_tree_node); |
| 89 |
85 private: | 90 private: |
86 // Holds data used to track browser side navigation metrics. | 91 // Holds data used to track browser side navigation metrics. |
87 struct NavigationMetricsData; | 92 struct NavigationMetricsData; |
88 | 93 |
89 friend class NavigatorTest; | 94 friend class NavigatorTestWithBrowserSideNavigation; |
90 ~NavigatorImpl() override; | 95 ~NavigatorImpl() override; |
91 | 96 |
92 // Navigates to the given entry, which must be the pending entry. Private | 97 // Navigates to the given entry, which must be the pending entry. Private |
93 // because all callers should use NavigateToPendingEntry. | 98 // because all callers should use NavigateToPendingEntry. |
94 bool NavigateToEntry( | 99 bool NavigateToEntry( |
95 RenderFrameHostImpl* render_frame_host, | 100 RenderFrameHostImpl* render_frame_host, |
96 const NavigationEntryImpl& entry, | 101 const NavigationEntryImpl& entry, |
97 NavigationController::ReloadType reload_type); | 102 NavigationController::ReloadType reload_type); |
98 | 103 |
99 bool ShouldAssignSiteForURL(const GURL& url); | 104 bool ShouldAssignSiteForURL(const GURL& url); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // different FrameTreeNodes, based on the frame_tree_node_id. | 136 // different FrameTreeNodes, based on the frame_tree_node_id. |
132 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; | 137 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; |
133 NavigationRequestMap navigation_request_map_; | 138 NavigationRequestMap navigation_request_map_; |
134 | 139 |
135 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 140 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
136 }; | 141 }; |
137 | 142 |
138 } // namespace content | 143 } // namespace content |
139 | 144 |
140 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 145 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |