Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ | |
| 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/time/time.h" | |
| 12 #include "content/common/content_export.h" | |
| 13 #include "content/common/frame_message_enums.h" | |
| 14 #include "content/public/common/page_state.h" | |
| 15 #include "content/public/common/page_transition_types.h" | |
| 16 #include "content/public/common/referrer.h" | |
| 17 #include "url/gurl.h" | |
| 18 | |
| 19 namespace content { | |
| 20 | |
| 21 // 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
| |
| 22 // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and | |
| 23 // FrameHostMsg_BeginNavigation. | |
| 24 | |
| 25 // Used by all navigation IPCs. | |
| 26 struct CONTENT_EXPORT CoreNavigationParams { | |
|
nasko
2014/09/22 23:13:03
Reading through other files, the "Core" prefix doe
| |
| 27 CoreNavigationParams(); | |
| 28 ~CoreNavigationParams(); | |
| 29 // 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.
| |
| 30 // PlzNavigate: May be modified when the navigation is ready to commit. | |
| 31 GURL url; | |
| 32 | |
| 33 // The URL to send in the "Referer" header field. Can be empty if there is | |
| 34 // no referrer. | |
| 35 Referrer referrer; | |
| 36 | |
| 37 // The type of transition. | |
| 38 PageTransition transition; | |
| 39 | |
| 40 // Type of navigation. | |
| 41 FrameMsg_Navigate_Type::Value navigation_type; | |
| 42 | |
| 43 // 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.
| |
| 44 bool allow_download; | |
| 45 }; | |
| 46 | |
| 47 // Used by FrameMsg_Navigate. | |
| 48 // PlzNavigate: sent to the renderer when requesting a navigation. | |
| 49 struct CONTENT_EXPORT RequestNavigationParams { | |
| 50 RequestNavigationParams(); | |
| 51 ~RequestNavigationParams(); | |
| 52 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.
| |
| 53 | |
| 54 // Extra headers (separated by \n) to send during the request. | |
| 55 std::string extra_headers; | |
| 56 | |
| 57 // If is_post is true, holds the post_data information from browser. Empty | |
| 58 // otherwise. | |
| 59 std::vector<unsigned char> browser_initiated_post_data; | |
| 60 }; | |
| 61 | |
| 62 // Used by FrameMsg_Navigate. | |
| 63 // PlzNavigate: sent to the renderer when the navigation is ready to commit. | |
| 64 struct CONTENT_EXPORT CommitNavigationParams { | |
| 65 CommitNavigationParams(); | |
| 66 ~CommitNavigationParams(); | |
| 67 // The page_id for this navigation, or -1 if it is a new navigation. Back, | |
| 68 // Forward, and Reload navigations should have a valid page_id. If the load | |
| 69 // succeeds, then this page_id will be reflected in the resultant | |
|
Charlie Reis
2014/09/19 23:12:32
nit: resultant -> resulting
| |
| 70 // FrameHostMsg_DidCommitProvisionalLoad message. | |
| 71 int32 page_id; | |
| 72 | |
| 73 // 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
| |
| 74 // case, the RenderView needs to notify the browser that the clearing was | |
| 75 // succesful when the navigation commits. | |
| 76 bool should_clear_history_list; | |
| 77 | |
| 78 // If page_id is -1, then pending_history_list_offset will also be -1. | |
| 79 // Otherwise, it contains the offset into the history list corresponding to | |
| 80 // the current navigation. | |
| 81 int pending_history_list_offset; | |
| 82 | |
| 83 // Used to inform the RenderFrame of where its current page contents reside in | |
| 84 // session history and the total size of the session history list. | |
| 85 int current_history_list_offset; | |
| 86 int current_history_list_length; | |
| 87 | |
| 88 // Opaque history state (received by ViewHostMsg_UpdateState). | |
| 89 PageState page_state; | |
| 90 | |
| 91 // Whether or not the user agent override string should be used. | |
| 92 bool is_overriding_user_agent; | |
| 93 | |
| 94 // The navigationStart time to expose through the Navigation Timing API to JS. | |
| 95 base::TimeTicks browser_navigation_start; | |
| 96 }; | |
| 97 | |
| 98 } // namespace content | |
| 99 | |
| 100 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | |
| OLD | NEW |