Index: content/common/navigation_params.h |
diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f917201a76cdf40ddd5b203e5977ddb4c1489e64 |
--- /dev/null |
+++ b/content/common/navigation_params.h |
@@ -0,0 +1,100 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
+#define CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/time/time.h" |
+#include "content/common/content_export.h" |
+#include "content/common/frame_message_enums.h" |
+#include "content/public/common/page_state.h" |
+#include "content/public/common/page_transition_types.h" |
+#include "content/public/common/referrer.h" |
+#include "url/gurl.h" |
+ |
+namespace content { |
+ |
+// The following structures hold parameters used during a navigation. In |
Charlie Reis
2014/09/19 23:12:32
Thanks. Despite the more verbose syntax to access
|
+// particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and |
+// FrameHostMsg_BeginNavigation. |
+ |
+// Used by all navigation IPCs. |
+struct CONTENT_EXPORT CoreNavigationParams { |
nasko
2014/09/22 23:13:03
Reading through other files, the "Core" prefix doe
|
+ CoreNavigationParams(); |
+ ~CoreNavigationParams(); |
+ // The URL to navigate to. |
nasko
2014/09/22 23:13:03
nit: empty line above the comment should make it a
clamy
2014/09/23 21:13:26
Done.
|
+ // PlzNavigate: May be modified when the navigation is ready to commit. |
+ GURL url; |
+ |
+ // The URL to send in the "Referer" header field. Can be empty if there is |
+ // no referrer. |
+ Referrer referrer; |
+ |
+ // The type of transition. |
+ PageTransition transition; |
+ |
+ // Type of navigation. |
+ FrameMsg_Navigate_Type::Value navigation_type; |
+ |
+ // Whether or not we should allow the URL to download. |
nasko
2014/09/22 23:13:03
nit: There was a long thread at some point about a
clamy
2014/09/23 21:13:26
Done.
|
+ bool allow_download; |
+}; |
+ |
+// Used by FrameMsg_Navigate. |
+// PlzNavigate: sent to the renderer when requesting a navigation. |
+struct CONTENT_EXPORT RequestNavigationParams { |
+ RequestNavigationParams(); |
+ ~RequestNavigationParams(); |
+ bool is_post; |
nasko
2014/09/22 23:13:03
nit: emtpy line between the destructor and member
clamy
2014/09/23 21:13:26
Done.
|
+ |
+ // Extra headers (separated by \n) to send during the request. |
+ std::string extra_headers; |
+ |
+ // If is_post is true, holds the post_data information from browser. Empty |
+ // otherwise. |
+ std::vector<unsigned char> browser_initiated_post_data; |
+}; |
+ |
+// Used by FrameMsg_Navigate. |
+// PlzNavigate: sent to the renderer when the navigation is ready to commit. |
+struct CONTENT_EXPORT CommitNavigationParams { |
+ CommitNavigationParams(); |
+ ~CommitNavigationParams(); |
+ // The page_id for this navigation, or -1 if it is a new navigation. Back, |
+ // Forward, and Reload navigations should have a valid page_id. If the load |
+ // succeeds, then this page_id will be reflected in the resultant |
Charlie Reis
2014/09/19 23:12:32
nit: resultant -> resulting
|
+ // FrameHostMsg_DidCommitProvisionalLoad message. |
+ int32 page_id; |
+ |
+ // Informs the RenderView the session history should be cleared. In that |
nasko
2014/09/22 23:13:03
nit: Since RenderView is going to go away, let's a
|
+ // case, the RenderView needs to notify the browser that the clearing was |
+ // succesful when the navigation commits. |
+ bool should_clear_history_list; |
+ |
+ // If page_id is -1, then pending_history_list_offset will also be -1. |
+ // Otherwise, it contains the offset into the history list corresponding to |
+ // the current navigation. |
+ int pending_history_list_offset; |
+ |
+ // Used to inform the RenderFrame of where its current page contents reside in |
+ // session history and the total size of the session history list. |
+ int current_history_list_offset; |
+ int current_history_list_length; |
+ |
+ // Opaque history state (received by ViewHostMsg_UpdateState). |
+ PageState page_state; |
+ |
+ // Whether or not the user agent override string should be used. |
+ bool is_overriding_user_agent; |
+ |
+ // The navigationStart time to expose through the Navigation Timing API to JS. |
+ base::TimeTicks browser_navigation_start; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |