summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/public/browser/page_navigator.cc5
-rw-r--r--content/public/browser/page_navigator.h13
2 files changed, 16 insertions, 2 deletions
diff --git a/content/public/browser/page_navigator.cc b/content/public/browser/page_navigator.cc
index 3358bd9..d6eb79f 100644
--- a/content/public/browser/page_navigator.cc
+++ b/content/public/browser/page_navigator.cc
@@ -14,6 +14,7 @@ OpenURLParams::OpenURLParams(
bool is_renderer_initiated)
: url(url),
referrer(referrer),
+ uses_post(false),
source_frame_id(-1),
disposition(disposition),
transition(transition),
@@ -31,6 +32,7 @@ OpenURLParams::OpenURLParams(
bool is_renderer_initiated)
: url(url),
referrer(referrer),
+ uses_post(false),
source_frame_id(source_frame_id),
disposition(disposition),
transition(transition),
@@ -40,7 +42,8 @@ OpenURLParams::OpenURLParams(
}
OpenURLParams::OpenURLParams()
- : source_frame_id(-1),
+ : uses_post(false),
+ source_frame_id(-1),
disposition(UNKNOWN),
transition(PageTransitionFromInt(0)),
is_renderer_initiated(false),
diff --git a/content/public/browser/page_navigator.h b/content/public/browser/page_navigator.h
index 41e50b1..7a6e788 100644
--- a/content/public/browser/page_navigator.h
+++ b/content/public/browser/page_navigator.h
@@ -11,6 +11,8 @@
#include <string>
+#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_memory.h"
#include "content/common/content_export.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/common/page_transition_types.h"
@@ -40,6 +42,15 @@ struct CONTENT_EXPORT OpenURLParams {
GURL url;
Referrer referrer;
+ // Indicates whether this navigation will be sent using POST.
+ // The POST method is limited support for basic POST data by leveraging
+ // NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST.
+ // It is not for things like file uploads.
+ bool uses_post;
+
+ // The post data when the navigation uses POST.
+ scoped_refptr<base::RefCountedMemory> browser_initiated_post_data;
+
// Extra headers to add to the request for this page. Headers are
// represented as "<name>: <value>" and separated by \r\n. The entire string
// is terminated by \r\n. May be empty if no extra headers are needed.
@@ -87,6 +98,6 @@ class PageNavigator {
virtual WebContents* OpenURL(const OpenURLParams& params) = 0;
};
-}
+} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_