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

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

Issue 2002633002: PlzNavigate: fix issue preventing navigations to WebUIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Getting the StoragePartition from NavigationRequest Created 4 years, 7 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 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/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/browser/frame_host/navigation_entry_impl.h" 12 #include "content/browser/frame_host/navigation_entry_impl.h"
13 #include "content/browser/loader/navigation_url_loader_delegate.h" 13 #include "content/browser/loader/navigation_url_loader_delegate.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/common/frame_message_enums.h" 15 #include "content/common/frame_message_enums.h"
16 #include "content/common/navigation_params.h" 16 #include "content/common/navigation_params.h"
17 #include "content/public/browser/navigation_throttle.h" 17 #include "content/public/browser/navigation_throttle.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 class FrameNavigationEntry; 21 class FrameNavigationEntry;
22 class FrameTreeNode; 22 class FrameTreeNode;
23 class NavigationControllerImpl; 23 class NavigationControllerImpl;
24 class NavigationHandleImpl; 24 class NavigationHandleImpl;
25 class NavigationURLLoader; 25 class NavigationURLLoader;
26 class NavigationData; 26 class NavigationData;
27 class NavigatorDelegate; 27 class NavigatorDelegate;
28 class ResourceRequestBody; 28 class ResourceRequestBody;
29 class SiteInstanceImpl; 29 class SiteInstanceImpl;
30 class StoragePartition;
30 class StreamHandle; 31 class StreamHandle;
31 struct NavigationRequestInfo; 32 struct NavigationRequestInfo;
32 33
33 // PlzNavigate 34 // PlzNavigate
34 // A UI thread object that owns a navigation request until it commits. It 35 // A UI thread object that owns a navigation request until it commits. It
35 // ensures the UI thread can start a navigation request in the 36 // ensures the UI thread can start a navigation request in the
36 // ResourceDispatcherHost (that lives on the IO thread). 37 // ResourceDispatcherHost (that lives on the IO thread).
37 // TODO(clamy): Describe the interactions between the UI and IO thread during 38 // TODO(clamy): Describe the interactions between the UI and IO thread during
38 // the navigation following its refactoring. 39 // the navigation following its refactoring.
39 class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { 40 class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void CreateNavigationHandle(int pending_nav_entry_id); 155 void CreateNavigationHandle(int pending_nav_entry_id);
155 156
156 // Transfers the ownership of the NavigationHandle to |render_frame_host|. 157 // Transfers the ownership of the NavigationHandle to |render_frame_host|.
157 // This should be called when the navigation is ready to commit, because the 158 // This should be called when the navigation is ready to commit, because the
158 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's 159 // NavigationHandle outlives the NavigationRequest. The NavigationHandle's
159 // lifetime is the entire navigation, while the NavigationRequest is 160 // lifetime is the entire navigation, while the NavigationRequest is
160 // destroyed when a navigation is ready for commit. 161 // destroyed when a navigation is ready for commit.
161 void TransferNavigationHandleOwnership( 162 void TransferNavigationHandleOwnership(
162 RenderFrameHostImpl* render_frame_host); 163 RenderFrameHostImpl* render_frame_host);
163 164
165 // Returns the StoragePartition to use for this navigation.
166 StoragePartition* GetStoragePartitionForNavigation();
167
164 private: 168 private:
165 NavigationRequest(FrameTreeNode* frame_tree_node, 169 NavigationRequest(FrameTreeNode* frame_tree_node,
166 const CommonNavigationParams& common_params, 170 const CommonNavigationParams& common_params,
167 const BeginNavigationParams& begin_params, 171 const BeginNavigationParams& begin_params,
168 const RequestNavigationParams& request_params, 172 const RequestNavigationParams& request_params,
169 scoped_refptr<ResourceRequestBody> body, 173 scoped_refptr<ResourceRequestBody> body,
170 bool browser_initiated, 174 bool browser_initiated,
171 const FrameNavigationEntry* frame_navigation_entry, 175 const FrameNavigationEntry* frame_navigation_entry,
172 const NavigationEntryImpl* navitation_entry); 176 const NavigationEntryImpl* navitation_entry);
173 177
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // the WillProcessResponse checks are performed by the NavigationHandle. 246 // the WillProcessResponse checks are performed by the NavigationHandle.
243 scoped_refptr<ResourceResponse> response_; 247 scoped_refptr<ResourceResponse> response_;
244 std::unique_ptr<StreamHandle> body_; 248 std::unique_ptr<StreamHandle> body_;
245 249
246 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); 250 DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
247 }; 251 };
248 252
249 } // namespace content 253 } // namespace content
250 254
251 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 255 #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') | content/browser/frame_host/navigation_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698