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

Unified Diff: ios/web/public/navigation_manager.h

Issue 1836793002: [ios] Moved WebLoadParams inside NavigationManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « ios/web/navigation/web_load_params.mm ('k') | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/navigation_manager.h
diff --git a/ios/web/public/navigation_manager.h b/ios/web/public/navigation_manager.h
index 11f1f9d4e80644770e535aee32620e703ea620e2..8e2b0fac735a78b9d585359204b119271a914cce 100644
--- a/ios/web/public/navigation_manager.h
+++ b/ios/web/public/navigation_manager.h
@@ -7,7 +7,13 @@
#include <stddef.h>
+#import "base/mac/scoped_nsobject.h"
#include "ios/web/public/browser_url_rewriter.h"
+#include "ios/web/public/referrer.h"
+#include "ui/base/page_transition_types.h"
+
+@class NSDictionary;
+@class NSData;
namespace web {
@@ -22,6 +28,40 @@ class WebState;
// exactly one NavigationManager.
class NavigationManager {
public:
+ // Parameters for URL loading. Most parameters are optional, and can be left
+ // at the default values set by the constructor.
+ struct WebLoadParams {
+ public:
+ // The URL to load. Must be set.
+ GURL url;
+
+ // The referrer for the load. May be empty.
+ Referrer referrer;
+
+ // The transition type for the load. Defaults to PAGE_TRANSITION_LINK.
+ ui::PageTransition transition_type;
+
+ // True for renderer-initiated navigations. This is
+ // important for tracking whether to display pending URLs.
+ bool is_renderer_initiated;
+
+ // Any extra HTTP headers to add to the load.
+ base::scoped_nsobject<NSDictionary> extra_headers;
+
+ // Any post data to send with the load. When setting this, you should
+ // generally set a Content-Type header as well.
+ base::scoped_nsobject<NSData> post_data;
+
+ // Create a new WebLoadParams with the given URL and defaults for all other
+ // parameters.
+ explicit WebLoadParams(const GURL& url);
+ ~WebLoadParams();
+
+ // Allow copying WebLoadParams.
+ WebLoadParams(const WebLoadParams& other);
+ WebLoadParams& operator=(const WebLoadParams& other);
+ };
+
virtual ~NavigationManager() {}
// Gets the BrowserState associated with this NavigationManager. Can never
« no previous file with comments | « ios/web/navigation/web_load_params.mm ('k') | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698