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

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

Issue 2697753002: PlzNavigate: Fix dynamic iframe back forward layout test failure (Closed)
Patch Set: Renamed is_user_gesture to has_user_gesture Created 3 years, 10 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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool was_ignored_by_handler) override; 56 bool was_ignored_by_handler) override;
57 void DidNavigate( 57 void DidNavigate(
58 RenderFrameHostImpl* render_frame_host, 58 RenderFrameHostImpl* render_frame_host,
59 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 59 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
60 std::unique_ptr<NavigationHandleImpl> navigation_handle) override; 60 std::unique_ptr<NavigationHandleImpl> navigation_handle) override;
61 bool NavigateToPendingEntry(FrameTreeNode* frame_tree_node, 61 bool NavigateToPendingEntry(FrameTreeNode* frame_tree_node,
62 const FrameNavigationEntry& frame_entry, 62 const FrameNavigationEntry& frame_entry,
63 ReloadType reload_type, 63 ReloadType reload_type,
64 bool is_same_document_history_load) override; 64 bool is_same_document_history_load) override;
65 bool NavigateNewChildFrame(RenderFrameHostImpl* render_frame_host, 65 bool NavigateNewChildFrame(RenderFrameHostImpl* render_frame_host,
66 bool is_renderer_initiated,
67 bool has_user_gesture,
66 const GURL& default_url) override; 68 const GURL& default_url) override;
67 void RequestOpenURL(RenderFrameHostImpl* render_frame_host, 69 void RequestOpenURL(RenderFrameHostImpl* render_frame_host,
68 const GURL& url, 70 const GURL& url,
69 bool uses_post, 71 bool uses_post,
70 const scoped_refptr<ResourceRequestBodyImpl>& body, 72 const scoped_refptr<ResourceRequestBodyImpl>& body,
71 const std::string& extra_headers, 73 const std::string& extra_headers,
72 const Referrer& referrer, 74 const Referrer& referrer,
73 WindowOpenDisposition disposition, 75 WindowOpenDisposition disposition,
74 bool should_replace_current_entry, 76 bool should_replace_current_entry,
75 bool user_gesture) override; 77 bool user_gesture) override;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Navigates to the given entry, which might be the pending entry (if 111 // Navigates to the given entry, which might be the pending entry (if
110 // |is_pending_entry| is true). Private because all callers should use either 112 // |is_pending_entry| is true). Private because all callers should use either
111 // NavigateToPendingEntry or NavigateToNewChildFrame. 113 // NavigateToPendingEntry or NavigateToNewChildFrame.
112 bool NavigateToEntry(FrameTreeNode* frame_tree_node, 114 bool NavigateToEntry(FrameTreeNode* frame_tree_node,
113 const FrameNavigationEntry& frame_entry, 115 const FrameNavigationEntry& frame_entry,
114 const NavigationEntryImpl& entry, 116 const NavigationEntryImpl& entry,
115 ReloadType reload_type, 117 ReloadType reload_type,
116 bool is_same_document_history_load, 118 bool is_same_document_history_load,
117 bool is_history_navigation_in_new_child, 119 bool is_history_navigation_in_new_child,
118 bool is_pending_entry, 120 bool is_pending_entry,
121 bool has_user_gesture,
119 const scoped_refptr<ResourceRequestBodyImpl>& post_body); 122 const scoped_refptr<ResourceRequestBodyImpl>& post_body);
120 123
121 bool ShouldAssignSiteForURL(const GURL& url); 124 bool ShouldAssignSiteForURL(const GURL& url);
122 125
123 // PlzNavigate: if needed, sends a BeforeUnload IPC to the renderer to ask it 126 // PlzNavigate: if needed, sends a BeforeUnload IPC to the renderer to ask it
124 // to execute the beforeUnload event. Otherwise, the navigation request will 127 // to execute the beforeUnload event. Otherwise, the navigation request will
125 // be started. 128 // be started.
126 void RequestNavigation(FrameTreeNode* frame_tree_node, 129 void RequestNavigation(FrameTreeNode* frame_tree_node,
127 const GURL& dest_url, 130 const GURL& dest_url,
128 const Referrer& dest_referrer, 131 const Referrer& dest_referrer,
129 const FrameNavigationEntry& frame_entry, 132 const FrameNavigationEntry& frame_entry,
130 const NavigationEntryImpl& entry, 133 const NavigationEntryImpl& entry,
131 ReloadType reload_type, 134 ReloadType reload_type,
132 PreviewsState previews_state, 135 PreviewsState previews_state,
133 bool is_same_document_history_load, 136 bool is_same_document_history_load,
134 bool is_history_navigation_in_new_child, 137 bool is_history_navigation_in_new_child,
138 bool has_user_gesture,
135 base::TimeTicks navigation_start); 139 base::TimeTicks navigation_start);
136 140
137 void RecordNavigationMetrics( 141 void RecordNavigationMetrics(
138 const LoadCommittedDetails& details, 142 const LoadCommittedDetails& details,
139 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 143 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
140 SiteInstance* site_instance); 144 SiteInstance* site_instance);
141 145
142 // Called when a navigation has started in a main frame, to update the pending 146 // Called when a navigation has started in a main frame, to update the pending
143 // NavigationEntry if the controller does not currently have a 147 // NavigationEntry if the controller does not currently have a
144 // browser-initiated one. 148 // browser-initiated one.
(...skipping 12 matching lines...) Expand all
157 NavigatorDelegate* delegate_; 161 NavigatorDelegate* delegate_;
158 162
159 std::unique_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_; 163 std::unique_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_;
160 164
161 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 165 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
162 }; 166 };
163 167
164 } // namespace content 168 } // namespace content
165 169
166 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 170 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698