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

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

Issue 2567253005: PlzNavigate: set browser_initiated based on the NavigationEntry (Closed)
Patch Set: Rebase + addressed comments Created 3 years, 12 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_NAVIGATION_REQUEST_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 RestoreType restore_type() const { return restore_type_; }; 125 RestoreType restore_type() const { return restore_type_; };
126 126
127 bool is_view_source() const { return is_view_source_; }; 127 bool is_view_source() const { return is_view_source_; };
128 128
129 int bindings() const { return bindings_; }; 129 int bindings() const { return bindings_; };
130 130
131 bool browser_initiated() const { return browser_initiated_ ; } 131 bool browser_initiated() const { return browser_initiated_ ; }
132 132
133 bool may_transfer() const { return may_transfer_; }
134
133 void SetWaitingForRendererResponse() { 135 void SetWaitingForRendererResponse() {
134 DCHECK(state_ == NOT_STARTED); 136 DCHECK(state_ == NOT_STARTED);
135 state_ = WAITING_FOR_RENDERER_RESPONSE; 137 state_ = WAITING_FOR_RENDERER_RESPONSE;
136 } 138 }
137 139
138 AssociatedSiteInstanceType associated_site_instance_type() const { 140 AssociatedSiteInstanceType associated_site_instance_type() const {
139 return associated_site_instance_type_; 141 return associated_site_instance_type_;
140 } 142 }
141 void set_associated_site_instance_type(AssociatedSiteInstanceType type) { 143 void set_associated_site_instance_type(AssociatedSiteInstanceType type) {
142 associated_site_instance_type_ = type; 144 associated_site_instance_type_ = type;
(...skipping 19 matching lines...) Expand all
162 const base::Closure& closure) { 164 const base::Closure& closure) {
163 on_start_checks_complete_closure_ = closure; 165 on_start_checks_complete_closure_ = closure;
164 } 166 }
165 167
166 private: 168 private:
167 NavigationRequest(FrameTreeNode* frame_tree_node, 169 NavigationRequest(FrameTreeNode* frame_tree_node,
168 const CommonNavigationParams& common_params, 170 const CommonNavigationParams& common_params,
169 const BeginNavigationParams& begin_params, 171 const BeginNavigationParams& begin_params,
170 const RequestNavigationParams& request_params, 172 const RequestNavigationParams& request_params,
171 bool browser_initiated, 173 bool browser_initiated,
174 bool may_transfer,
172 const FrameNavigationEntry* frame_navigation_entry, 175 const FrameNavigationEntry* frame_navigation_entry,
173 const NavigationEntryImpl* navitation_entry); 176 const NavigationEntryImpl* navitation_entry);
174 177
175 // NavigationURLLoaderDelegate implementation. 178 // NavigationURLLoaderDelegate implementation.
176 void OnRequestRedirected( 179 void OnRequestRedirected(
177 const net::RedirectInfo& redirect_info, 180 const net::RedirectInfo& redirect_info,
178 const scoped_refptr<ResourceResponse>& response) override; 181 const scoped_refptr<ResourceResponse>& response) override;
179 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response, 182 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
180 std::unique_ptr<StreamHandle> body, 183 std::unique_ptr<StreamHandle> body,
181 const SSLStatus& ssl_status, 184 const SSLStatus& ssl_status,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // creation time. 225 // creation time.
223 scoped_refptr<SiteInstanceImpl> source_site_instance_; 226 scoped_refptr<SiteInstanceImpl> source_site_instance_;
224 scoped_refptr<SiteInstanceImpl> dest_site_instance_; 227 scoped_refptr<SiteInstanceImpl> dest_site_instance_;
225 RestoreType restore_type_; 228 RestoreType restore_type_;
226 bool is_view_source_; 229 bool is_view_source_;
227 int bindings_; 230 int bindings_;
228 231
229 // The type of SiteInstance associated with this navigation. 232 // The type of SiteInstance associated with this navigation.
230 AssociatedSiteInstanceType associated_site_instance_type_; 233 AssociatedSiteInstanceType associated_site_instance_type_;
231 234
235 // Whether the request may be transferred to a different process upon commit.
236 // True for browser-initiated navigations and renderer-inititated navigations
237 // started via the OpenURL path.
238 // Note: the RenderFrameHostManager may still decide to have the navigation
239 // commit in a different renderer process if it detects that a renderer
240 // transfer is needed. This is the case in particular when --site-per-process
241 // is enabled.
242 bool may_transfer_;
243
232 std::unique_ptr<NavigationHandleImpl> navigation_handle_; 244 std::unique_ptr<NavigationHandleImpl> navigation_handle_;
233 245
234 // Holds the ResourceResponse and the StreamHandle for the navigation while 246 // Holds the ResourceResponse and the StreamHandle for the navigation while
235 // the WillProcessResponse checks are performed by the NavigationHandle. 247 // the WillProcessResponse checks are performed by the NavigationHandle.
236 scoped_refptr<ResourceResponse> response_; 248 scoped_refptr<ResourceResponse> response_;
237 std::unique_ptr<StreamHandle> body_; 249 std::unique_ptr<StreamHandle> body_;
238 250
239 base::Closure on_start_checks_complete_closure_; 251 base::Closure on_start_checks_complete_closure_;
240 252
241 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); 253 DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
242 }; 254 };
243 255
244 } // namespace content 256 } // namespace content
245 257
246 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 258 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698