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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 bool has_stale_copy_in_cache, | 81 bool has_stale_copy_in_cache, |
82 int error_code) override; | 82 int error_code) override; |
83 void LogResourceRequestTime(base::TimeTicks timestamp, | 83 void LogResourceRequestTime(base::TimeTicks timestamp, |
84 const GURL& url) override; | 84 const GURL& url) override; |
85 void LogBeforeUnloadTime( | 85 void LogBeforeUnloadTime( |
86 const base::TimeTicks& renderer_before_unload_start_time, | 86 const base::TimeTicks& renderer_before_unload_start_time, |
87 const base::TimeTicks& renderer_before_unload_end_time) override; | 87 const base::TimeTicks& renderer_before_unload_end_time) override; |
88 void CancelNavigation(FrameTreeNode* frame_tree_node) override; | 88 void CancelNavigation(FrameTreeNode* frame_tree_node) override; |
89 bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node) override; | 89 bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node) override; |
90 | 90 |
91 // PlzNavigate | |
92 // Returns the navigation request for a given node. Used in tests. | |
93 NavigationRequest* GetNavigationRequestForNodeForTesting( | |
94 FrameTreeNode* frame_tree_node); | |
95 | |
96 private: | 91 private: |
97 // Holds data used to track browser side navigation metrics. | 92 // Holds data used to track browser side navigation metrics. |
98 struct NavigationMetricsData; | 93 struct NavigationMetricsData; |
99 | 94 |
100 friend class NavigatorTestWithBrowserSideNavigation; | 95 friend class NavigatorTestWithBrowserSideNavigation; |
101 ~NavigatorImpl() override; | 96 ~NavigatorImpl() override; |
102 | 97 |
103 // Navigates to the given entry, which must be the pending entry. Private | 98 // Navigates to the given entry, which must be the pending entry. Private |
104 // because all callers should use NavigateToPendingEntry. | 99 // because all callers should use NavigateToPendingEntry. |
105 bool NavigateToEntry( | 100 bool NavigateToEntry( |
(...skipping 29 matching lines...) Expand all Loading... |
135 // TODO(nasko): Move ownership of the NavigationController from | 130 // TODO(nasko): Move ownership of the NavigationController from |
136 // WebContentsImpl to this class. | 131 // WebContentsImpl to this class. |
137 NavigationControllerImpl* controller_; | 132 NavigationControllerImpl* controller_; |
138 | 133 |
139 // Used to notify the object embedding this Navigator about navigation | 134 // Used to notify the object embedding this Navigator about navigation |
140 // events. Can be NULL in tests. | 135 // events. Can be NULL in tests. |
141 NavigatorDelegate* delegate_; | 136 NavigatorDelegate* delegate_; |
142 | 137 |
143 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; | 138 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; |
144 | 139 |
145 // PlzNavigate: used to track the various ongoing NavigationRequests in the | |
146 // different FrameTreeNodes, based on the frame_tree_node_id. | |
147 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; | |
148 NavigationRequestMap navigation_request_map_; | |
149 | |
150 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 140 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
151 }; | 141 }; |
152 | 142 |
153 } // namespace content | 143 } // namespace content |
154 | 144 |
155 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 145 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |