OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 int load_flags; | 98 int load_flags; |
99 | 99 |
100 // True if the request was user initiated. | 100 // True if the request was user initiated. |
101 bool has_user_gesture; | 101 bool has_user_gesture; |
102 }; | 102 }; |
103 | 103 |
104 // Used by FrameMsg_Navigate. | 104 // Used by FrameMsg_Navigate. |
105 // PlzNavigate: sent to the renderer when the navigation is ready to commit. | 105 // PlzNavigate: sent to the renderer when the navigation is ready to commit. |
106 struct CONTENT_EXPORT CommitNavigationParams { | 106 struct CONTENT_EXPORT CommitNavigationParams { |
107 CommitNavigationParams(); | 107 CommitNavigationParams(); |
108 CommitNavigationParams(const PageState& page_state, | 108 CommitNavigationParams(bool is_overriding_user_agent, |
109 bool is_overriding_user_agent, | |
110 base::TimeTicks navigation_start); | 109 base::TimeTicks navigation_start); |
111 ~CommitNavigationParams(); | 110 ~CommitNavigationParams(); |
112 | 111 |
113 // Opaque history state (received by ViewHostMsg_UpdateState). | |
114 PageState page_state; | |
115 | |
116 // Whether or not the user agent override string should be used. | 112 // Whether or not the user agent override string should be used. |
117 bool is_overriding_user_agent; | 113 bool is_overriding_user_agent; |
118 | 114 |
119 // The navigationStart time to expose through the Navigation Timing API to JS. | 115 // The navigationStart time to expose through the Navigation Timing API to JS. |
120 base::TimeTicks browser_navigation_start; | 116 base::TimeTicks browser_navigation_start; |
121 | 117 |
122 // TODO(clamy): Move the redirect chain here. | 118 // TODO(clamy): Move the redirect chain here. |
123 }; | 119 }; |
124 | 120 |
| 121 // Used by FrameMsg_Navigate. |
| 122 // PlzNavigate: sent to the renderer when the navigation is ready to commit. |
| 123 struct CONTENT_EXPORT HistoryNavigationParams { |
| 124 HistoryNavigationParams(); |
| 125 HistoryNavigationParams(const PageState& page_state, |
| 126 int32 page_id, |
| 127 int pending_history_list_offset, |
| 128 int current_history_list_offset, |
| 129 int current_history_list_length, |
| 130 bool should_clear_history_list); |
| 131 ~HistoryNavigationParams(); |
| 132 |
| 133 // Opaque history state (received by ViewHostMsg_UpdateState). |
| 134 PageState page_state; |
| 135 |
| 136 // The page_id for this navigation, or -1 if it is a new navigation. Back, |
| 137 // Forward, and Reload navigations should have a valid page_id. If the load |
| 138 // succeeds, then this page_id will be reflected in the resultant |
| 139 // FrameHostMsg_DidCommitProvisionalLoad message. |
| 140 int32 page_id; |
| 141 |
| 142 // For history navigations, this is the offset in the history list of the |
| 143 // pending load. For non-history navigations, this will be ignored. |
| 144 int pending_history_list_offset; |
| 145 |
| 146 // Where its current page contents reside in session history and the total |
| 147 // size of the session history list. |
| 148 int current_history_list_offset; |
| 149 int current_history_list_length; |
| 150 |
| 151 // Whether session history should be cleared. In that case, the RenderView |
| 152 // needs to notify the browser that the clearing was succesful when the |
| 153 // navigation commits. |
| 154 bool should_clear_history_list; |
| 155 }; |
| 156 |
125 } // namespace content | 157 } // namespace content |
126 | 158 |
127 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 159 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |