OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // IPC messages for interacting with frames. | 5 // IPC messages for interacting with frames. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/common/content_param_traits.h" | 9 #include "content/common/content_param_traits.h" |
| 10 #include "content/common/frame_message_enums.h" |
10 #include "content/common/frame_param.h" | 11 #include "content/common/frame_param.h" |
11 #include "content/common/navigation_gesture.h" | 12 #include "content/common/navigation_gesture.h" |
12 #include "content/public/common/common_param_traits.h" | 13 #include "content/public/common/common_param_traits.h" |
13 #include "content/public/common/context_menu_params.h" | 14 #include "content/public/common/context_menu_params.h" |
14 #include "content/public/common/frame_navigate_params.h" | 15 #include "content/public/common/frame_navigate_params.h" |
15 #include "content/public/common/page_state.h" | 16 #include "content/public/common/page_state.h" |
16 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 | 19 |
19 #undef IPC_MESSAGE_EXPORT | 20 #undef IPC_MESSAGE_EXPORT |
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
21 | 22 |
22 #define IPC_MESSAGE_START FrameMsgStart | 23 #define IPC_MESSAGE_START FrameMsgStart |
23 | 24 |
| 25 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, |
| 26 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
24 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 27 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
25 blink::WebContextMenuData::MediaTypeLast) | 28 blink::WebContextMenuData::MediaTypeLast) |
26 | 29 |
27 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 30 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
28 | 31 |
29 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) | 32 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) |
30 IPC_STRUCT_TRAITS_MEMBER(media_type) | 33 IPC_STRUCT_TRAITS_MEMBER(media_type) |
31 IPC_STRUCT_TRAITS_MEMBER(x) | 34 IPC_STRUCT_TRAITS_MEMBER(x) |
32 IPC_STRUCT_TRAITS_MEMBER(y) | 35 IPC_STRUCT_TRAITS_MEMBER(y) |
33 IPC_STRUCT_TRAITS_MEMBER(link_url) | 36 IPC_STRUCT_TRAITS_MEMBER(link_url) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 IPC_STRUCT_MEMBER(GURL, original_request_url) | 150 IPC_STRUCT_MEMBER(GURL, original_request_url) |
148 | 151 |
149 // User agent override used to navigate. | 152 // User agent override used to navigate. |
150 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) | 153 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) |
151 | 154 |
152 // Notifies the browser that for this navigation, the session history was | 155 // Notifies the browser that for this navigation, the session history was |
153 // successfully cleared. | 156 // successfully cleared. |
154 IPC_STRUCT_MEMBER(bool, history_list_was_cleared) | 157 IPC_STRUCT_MEMBER(bool, history_list_was_cleared) |
155 IPC_STRUCT_END() | 158 IPC_STRUCT_END() |
156 | 159 |
| 160 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
| 161 // The page_id for this navigation, or -1 if it is a new navigation. Back, |
| 162 // Forward, and Reload navigations should have a valid page_id. If the load |
| 163 // succeeds, then this page_id will be reflected in the resultant |
| 164 // FrameHostMsg_DidCommitProvisionalLoad message. |
| 165 IPC_STRUCT_MEMBER(int32, page_id) |
| 166 |
| 167 // If page_id is -1, then pending_history_list_offset will also be -1. |
| 168 // Otherwise, it contains the offset into the history list corresponding to |
| 169 // the current navigation. |
| 170 IPC_STRUCT_MEMBER(int, pending_history_list_offset) |
| 171 |
| 172 // Informs the RenderView of where its current page contents reside in |
| 173 // session history and the total size of the session history list. |
| 174 IPC_STRUCT_MEMBER(int, current_history_list_offset) |
| 175 IPC_STRUCT_MEMBER(int, current_history_list_length) |
| 176 |
| 177 // Informs the RenderView the session history should be cleared. In that |
| 178 // case, the RenderView needs to notify the browser that the clearing was |
| 179 // succesful when the navigation commits. |
| 180 IPC_STRUCT_MEMBER(bool, should_clear_history_list) |
| 181 |
| 182 // The URL to load. |
| 183 IPC_STRUCT_MEMBER(GURL, url) |
| 184 |
| 185 // Base URL for use in WebKit's SubstituteData. |
| 186 // Is only used with data: URLs. |
| 187 IPC_STRUCT_MEMBER(GURL, base_url_for_data_url) |
| 188 |
| 189 // History URL for use in WebKit's SubstituteData. |
| 190 // Is only used with data: URLs. |
| 191 IPC_STRUCT_MEMBER(GURL, history_url_for_data_url) |
| 192 |
| 193 // The URL to send in the "Referer" header field. Can be empty if there is |
| 194 // no referrer. |
| 195 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
| 196 |
| 197 // Any redirect URLs that occurred before |url|. Useful for cross-process |
| 198 // navigations; defaults to empty. |
| 199 IPC_STRUCT_MEMBER(std::vector<GURL>, redirects) |
| 200 |
| 201 // The type of transition. |
| 202 IPC_STRUCT_MEMBER(content::PageTransition, transition) |
| 203 |
| 204 // Informs the RenderView the pending navigation should replace the current |
| 205 // history entry when it commits. This is used for cross-process redirects so |
| 206 // the transferred navigation can recover the navigation state. |
| 207 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
| 208 |
| 209 // Opaque history state (received by ViewHostMsg_UpdateState). |
| 210 IPC_STRUCT_MEMBER(content::PageState, page_state) |
| 211 |
| 212 // Type of navigation. |
| 213 IPC_STRUCT_MEMBER(FrameMsg_Navigate_Type::Value, navigation_type) |
| 214 |
| 215 // The time the request was created |
| 216 IPC_STRUCT_MEMBER(base::Time, request_time) |
| 217 |
| 218 // Extra headers (separated by \n) to send during the request. |
| 219 IPC_STRUCT_MEMBER(std::string, extra_headers) |
| 220 |
| 221 // The following two members identify a previous request that has been |
| 222 // created before this navigation is being transferred to a new render view. |
| 223 // This serves the purpose of recycling the old request. |
| 224 // Unless this refers to a transferred navigation, these values are -1 and -1. |
| 225 IPC_STRUCT_MEMBER(int, transferred_request_child_id) |
| 226 IPC_STRUCT_MEMBER(int, transferred_request_request_id) |
| 227 |
| 228 // Whether or not we should allow the url to download. |
| 229 IPC_STRUCT_MEMBER(bool, allow_download) |
| 230 |
| 231 // Whether or not the user agent override string should be used. |
| 232 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) |
| 233 |
| 234 // True if this was a post request. |
| 235 IPC_STRUCT_MEMBER(bool, is_post) |
| 236 |
| 237 // If is_post is true, holds the post_data information from browser. Empty |
| 238 // otherwise. |
| 239 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data) |
| 240 |
| 241 // Whether or not this url should be allowed to access local file:// |
| 242 // resources. |
| 243 IPC_STRUCT_MEMBER(bool, can_load_local_resources) |
| 244 |
| 245 // If not empty, which frame to navigate. |
| 246 IPC_STRUCT_MEMBER(std::string, frame_to_navigate) |
| 247 |
| 248 // The navigationStart time to expose to JS for this navigation. |
| 249 IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start) |
| 250 IPC_STRUCT_END() |
| 251 |
157 // ----------------------------------------------------------------------------- | 252 // ----------------------------------------------------------------------------- |
158 // Messages sent from the browser to the renderer. | 253 // Messages sent from the browser to the renderer. |
159 | 254 |
160 // When HW accelerated buffers are swapped in an out-of-process child frame | 255 // When HW accelerated buffers are swapped in an out-of-process child frame |
161 // renderer, the message is forwarded to the embedding frame to notify it of | 256 // renderer, the message is forwarded to the embedding frame to notify it of |
162 // a new texture available for compositing. When the buffer has finished | 257 // a new texture available for compositing. When the buffer has finished |
163 // presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to | 258 // presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to |
164 // gpu host that produced this buffer. | 259 // gpu host that produced this buffer. |
165 // | 260 // |
166 // This is used in the non-ubercomp HW accelerated compositing path. | 261 // This is used in the non-ubercomp HW accelerated compositing path. |
(...skipping 16 matching lines...) Expand all Loading... |
183 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that | 278 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that |
184 // the menu has been closed. | 279 // the menu has been closed. |
185 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed, | 280 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed, |
186 content::CustomContextMenuContext /* custom_context */) | 281 content::CustomContextMenuContext /* custom_context */) |
187 | 282 |
188 // Executes custom context menu action that was provided from Blink. | 283 // Executes custom context menu action that was provided from Blink. |
189 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction, | 284 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction, |
190 content::CustomContextMenuContext /* custom_context */, | 285 content::CustomContextMenuContext /* custom_context */, |
191 unsigned /* action */) | 286 unsigned /* action */) |
192 | 287 |
| 288 // Tells the renderer to perform the specified navigation, interrupting any |
| 289 // existing navigation. |
| 290 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) |
| 291 |
193 // ----------------------------------------------------------------------------- | 292 // ----------------------------------------------------------------------------- |
194 // Messages sent from the renderer to the browser. | 293 // Messages sent from the renderer to the browser. |
195 | 294 |
196 // Sent by the renderer when a child frame is created in the renderer. The | 295 // Sent by the renderer when a child frame is created in the renderer. The |
197 // |parent_frame_id| and |frame_id| are NOT routing ids. They are | 296 // |parent_frame_id| and |frame_id| are NOT routing ids. They are |
198 // renderer-allocated identifiers used for tracking a frame's creation. | 297 // renderer-allocated identifiers used for tracking a frame's creation. |
199 // | 298 // |
200 // Each of these messages will have a corresponding FrameHostMsg_Detach message | 299 // Each of these messages will have a corresponding FrameHostMsg_Detach message |
201 // sent when the frame is detached from the DOM. | 300 // sent when the frame is detached from the DOM. |
202 // | 301 // |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // Instructs the frame to swap out for a cross-site transition, including | 429 // Instructs the frame to swap out for a cross-site transition, including |
331 // running the unload event handler. Expects a SwapOut_ACK message when | 430 // running the unload event handler. Expects a SwapOut_ACK message when |
332 // finished. | 431 // finished. |
333 IPC_MESSAGE_ROUTED0(FrameMsg_SwapOut) | 432 IPC_MESSAGE_ROUTED0(FrameMsg_SwapOut) |
334 | 433 |
335 // Used to tell the parent that the user right clicked on an area of the | 434 // Used to tell the parent that the user right clicked on an area of the |
336 // content area, and a context menu should be shown for it. The params | 435 // content area, and a context menu should be shown for it. The params |
337 // object contains information about the node(s) that were selected when the | 436 // object contains information about the node(s) that were selected when the |
338 // user right clicked. | 437 // user right clicked. |
339 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams) | 438 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams) |
OLD | NEW |