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

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

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Created 5 years, 11 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 void LogBeforeUnloadTime( 81 void LogBeforeUnloadTime(
82 const base::TimeTicks& renderer_before_unload_start_time, 82 const base::TimeTicks& renderer_before_unload_start_time,
83 const base::TimeTicks& renderer_before_unload_end_time) override; 83 const base::TimeTicks& renderer_before_unload_end_time) override;
84 void CancelNavigation(FrameTreeNode* frame_tree_node) override; 84 void CancelNavigation(FrameTreeNode* frame_tree_node) override;
85 85
86 // PlzNavigate 86 // PlzNavigate
87 // Returns the navigation request for a given node. Used in tests. 87 // Returns the navigation request for a given node. Used in tests.
88 NavigationRequest* GetNavigationRequestForNodeForTesting( 88 NavigationRequest* GetNavigationRequestForNodeForTesting(
89 FrameTreeNode* frame_tree_node); 89 FrameTreeNode* frame_tree_node);
90 90
91 // PlzNavigate
92 // Returns whether there is an ongoing navigation waiting for the BeforeUnload
93 // event to execute in the renderer.
nasko 2015/01/17 00:22:01 nit: s/renderer/renderer process/.
clamy 2015/01/19 17:29:19 Done (note that the comment was moved to Navigator
94 bool IsWaitingForBeforeUnloadACK(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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // different FrameTreeNodes, based on the frame_tree_node_id. 142 // different FrameTreeNodes, based on the frame_tree_node_id.
138 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; 143 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap;
139 NavigationRequestMap navigation_request_map_; 144 NavigationRequestMap navigation_request_map_;
140 145
141 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 146 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
142 }; 147 };
143 148
144 } // namespace content 149 } // namespace content
145 150
146 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 151 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | content/browser/frame_host/render_frame_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698