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