Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: content/browser/frame_host/navigator_impl.h

Issue 1092973002: Revert of PlzNavigate: move ownership of the NavigationRequest to the FrameTreeNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
91 private: 96 private:
92 // Holds data used to track browser side navigation metrics. 97 // Holds data used to track browser side navigation metrics.
93 struct NavigationMetricsData; 98 struct NavigationMetricsData;
94 99
95 friend class NavigatorTestWithBrowserSideNavigation; 100 friend class NavigatorTestWithBrowserSideNavigation;
96 ~NavigatorImpl() override; 101 ~NavigatorImpl() override;
97 102
98 // Navigates to the given entry, which must be the pending entry. Private 103 // Navigates to the given entry, which must be the pending entry. Private
99 // because all callers should use NavigateToPendingEntry. 104 // because all callers should use NavigateToPendingEntry.
100 bool NavigateToEntry( 105 bool NavigateToEntry(
(...skipping 29 matching lines...) Expand all
130 // TODO(nasko): Move ownership of the NavigationController from 135 // TODO(nasko): Move ownership of the NavigationController from
131 // WebContentsImpl to this class. 136 // WebContentsImpl to this class.
132 NavigationControllerImpl* controller_; 137 NavigationControllerImpl* controller_;
133 138
134 // Used to notify the object embedding this Navigator about navigation 139 // Used to notify the object embedding this Navigator about navigation
135 // events. Can be NULL in tests. 140 // events. Can be NULL in tests.
136 NavigatorDelegate* delegate_; 141 NavigatorDelegate* delegate_;
137 142
138 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; 143 scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_;
139 144
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
140 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 150 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
141 }; 151 };
142 152
143 } // namespace content 153 } // namespace content
144 154
145 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 155 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698