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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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 "base/basictypes.h" 8 #include "base/basictypes.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 NavigationRequest(FrameTreeNode* frame_tree_node, 142 NavigationRequest(FrameTreeNode* frame_tree_node,
143 const CommonNavigationParams& common_params, 143 const CommonNavigationParams& common_params,
144 const BeginNavigationParams& begin_params, 144 const BeginNavigationParams& begin_params,
145 const RequestNavigationParams& request_params, 145 const RequestNavigationParams& request_params,
146 scoped_refptr<ResourceRequestBody> body, 146 scoped_refptr<ResourceRequestBody> body,
147 bool browser_initiated, 147 bool browser_initiated,
148 const FrameNavigationEntry* frame_navigation_entry, 148 const FrameNavigationEntry* frame_navigation_entry,
149 const NavigationEntryImpl* navitation_entry); 149 const NavigationEntryImpl* navitation_entry);
150 150
151 // NavigationURLLoaderDelegate implementation. 151 // NavigationURLLoaderDelegate implementation.
152 void OnRequestRedirected( 152 void OnRequestRedirected(const net::RedirectInfo& redirect_info,
153 const net::RedirectInfo& redirect_info, 153 const scoped_refptr<ResourceResponse>& response,
154 const scoped_refptr<ResourceResponse>& response) override; 154 bool is_external_protocol) override;
155 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response, 155 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
156 scoped_ptr<StreamHandle> body) override; 156 scoped_ptr<StreamHandle> body) override;
157 void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) override; 157 void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) override;
158 void OnRequestStarted(base::TimeTicks timestamp) override; 158 void OnRequestStarted(base::TimeTicks timestamp) override;
159 159
160 FrameTreeNode* frame_tree_node_; 160 FrameTreeNode* frame_tree_node_;
161 161
162 // Initialized on creation of the NavigationRequest. Sent to the renderer when 162 // Initialized on creation of the NavigationRequest. Sent to the renderer when
163 // the navigation is ready to commit. 163 // the navigation is ready to commit.
164 // Note: When the navigation is ready to commit, the url in |common_params| 164 // Note: When the navigation is ready to commit, the url in |common_params|
165 // will be set to the final navigation url, obtained after following all 165 // will be set to the final navigation url, obtained after following all
166 // redirects. 166 // redirects.
167 // Note: |common_params_| and |begin_params_| are not const as they can be
168 // modified during redirects.
167 CommonNavigationParams common_params_; 169 CommonNavigationParams common_params_;
168 const BeginNavigationParams begin_params_; 170 BeginNavigationParams begin_params_;
169 const RequestNavigationParams request_params_; 171 const RequestNavigationParams request_params_;
170 const bool browser_initiated_; 172 const bool browser_initiated_;
171 173
172 NavigationState state_; 174 NavigationState state_;
173 175
174 176
175 // The parameters to send to the IO thread. |loader_| takes ownership of 177 // The parameters to send to the IO thread. |loader_| takes ownership of
176 // |info_| after calling BeginNavigation. 178 // |info_| after calling BeginNavigation.
177 scoped_ptr<NavigationRequestInfo> info_; 179 scoped_ptr<NavigationRequestInfo> info_;
178 180
179 scoped_ptr<NavigationURLLoader> loader_; 181 scoped_ptr<NavigationURLLoader> loader_;
180 182
181 // These next items are used in browser-initiated navigations to store 183 // These next items are used in browser-initiated navigations to store
182 // information from the NavigationEntryImpl that is required after request 184 // information from the NavigationEntryImpl that is required after request
183 // creation time. 185 // creation time.
184 scoped_refptr<SiteInstanceImpl> source_site_instance_; 186 scoped_refptr<SiteInstanceImpl> source_site_instance_;
185 scoped_refptr<SiteInstanceImpl> dest_site_instance_; 187 scoped_refptr<SiteInstanceImpl> dest_site_instance_;
186 NavigationEntryImpl::RestoreType restore_type_; 188 NavigationEntryImpl::RestoreType restore_type_;
187 bool is_view_source_; 189 bool is_view_source_;
188 int bindings_; 190 int bindings_;
189 191
190 scoped_ptr<NavigationHandleImpl> navigation_handle_; 192 scoped_ptr<NavigationHandleImpl> navigation_handle_;
191 193
192 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); 194 DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
193 }; 195 };
194 196
195 } // namespace content 197 } // namespace content
196 198
197 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 199 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698