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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2734633002: PlzNavigate: Fix the http/tests/loading/307-after-303-after-post.html and the http/tests/loading/re… (Closed)
Patch Set: Fix comment Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index d1731be222111b2dea5bf60785f8dfa10e02e495..ee3cac13f89f33b80498a1af81590295884ecdd2 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -553,7 +553,8 @@ class CONTENT_EXPORT RenderFrameImpl
void willSubmitForm(const blink::WebFormElement& form) override;
void didCreateDataSource(blink::WebLocalFrame* frame,
blink::WebDataSource* datasource) override;
- void didStartProvisionalLoad(blink::WebDataSource* data_source) override;
+ void didStartProvisionalLoad(blink::WebDataSource* data_source,
+ blink::WebURLRequest& request) override;
void didReceiveServerRedirectForProvisionalLoad(
blink::WebLocalFrame* frame) override;
void didFailProvisionalLoad(blink::WebLocalFrame* frame,
@@ -1396,6 +1397,36 @@ class CONTENT_EXPORT RenderFrameImpl
// See BindingsPolicy for details.
int enabled_bindings_ = 0;
+ // PlzNavigate:
+ // Contains information about a pending navigation to be sent to the browser.
+ // We save information about the navigation in decidePolicyForNavigation().
+ // The navigation is sent to the browser in didStartProvisionalLoad().
+ // Please see the BeginNavigation() for information.
+ struct PendingNavigationInfo {
+ blink::WebNavigationType navigation_type;
+ blink::WebNavigationPolicy policy;
+ bool replaces_current_history_item;
+ bool history_navigation_in_new_child_frame;
+ bool client_redirect;
+ bool cache_disabled;
+ blink::WebFormElement form;
+
+ PendingNavigationInfo(const NavigationPolicyInfo& info)
+ : navigation_type(info.navigationType),
+ policy(info.defaultPolicy),
+ replaces_current_history_item(info.replacesCurrentHistoryItem),
+ history_navigation_in_new_child_frame(
+ info.isHistoryNavigationInNewChildFrame),
+ client_redirect(info.isClientRedirect),
+ cache_disabled(info.isCacheDisabled),
+ form(info.form) {}
+ };
+
+ // PlzNavigate: Contains information about a pending navigation to be sent to
+ // the browser. This state is allocated in decidePolicyForNavigation() and
+ // is used and released in didStartProvisionalLoad().
+ std::unique_ptr<PendingNavigationInfo> pending_navigation_info_;
+
base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698