OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 page rendering. | 5 // IPC messages for page rendering. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "base/process.h" | 8 #include "base/process.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/common/css_colors.h" | 11 #include "content/common/css_colors.h" |
12 #include "content/common/edit_command.h" | 12 #include "content/common/edit_command.h" |
13 #include "content/common/navigation_gesture.h" | 13 #include "content/common/navigation_gesture.h" |
14 #include "content/common/view_message_enums.h" | 14 #include "content/common/view_message_enums.h" |
15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
| 16 #include "content/public/common/file_chooser_params.h" |
16 #include "content/public/common/frame_navigate_params.h" | 17 #include "content/public/common/frame_navigate_params.h" |
17 #include "content/public/common/page_zoom.h" | 18 #include "content/public/common/page_zoom.h" |
18 #include "content/public/common/renderer_preferences.h" | 19 #include "content/public/common/renderer_preferences.h" |
19 #include "content/public/common/webkit_param_traits.h" | 20 #include "content/public/common/webkit_param_traits.h" |
20 #include "content/public/common/window_container_type.h" | 21 #include "content/public/common/window_container_type.h" |
21 #include "ipc/ipc_channel_handle.h" | 22 #include "ipc/ipc_channel_handle.h" |
22 #include "ipc/ipc_message_macros.h" | 23 #include "ipc/ipc_message_macros.h" |
23 #include "ipc/ipc_platform_file.h" | 24 #include "ipc/ipc_platform_file.h" |
24 #include "media/base/media_log_event.h" | 25 #include "media/base/media_log_event.h" |
25 #include "third_party/skia/include/core/SkBitmap.h" | 26 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 17 matching lines...) Expand all Loading... |
43 #include "content/common/mac/font_descriptor.h" | 44 #include "content/common/mac/font_descriptor.h" |
44 #endif | 45 #endif |
45 | 46 |
46 #undef IPC_MESSAGE_EXPORT | 47 #undef IPC_MESSAGE_EXPORT |
47 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 48 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
48 | 49 |
49 #define IPC_MESSAGE_START ViewMsgStart | 50 #define IPC_MESSAGE_START ViewMsgStart |
50 | 51 |
51 IPC_ENUM_TRAITS(CSSColors::CSSColorName) | 52 IPC_ENUM_TRAITS(CSSColors::CSSColorName) |
52 IPC_ENUM_TRAITS(NavigationGesture) | 53 IPC_ENUM_TRAITS(NavigationGesture) |
53 IPC_ENUM_TRAITS(content::PageZoom) | |
54 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) | 54 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) |
55 IPC_ENUM_TRAITS(ViewHostMsg_RunFileChooser_Mode::Value) | |
56 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) | 55 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) |
57 IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action) | 56 IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action) |
58 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) | 57 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) |
59 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) | 58 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) |
60 IPC_ENUM_TRAITS(WebKit::WebPopupType) | 59 IPC_ENUM_TRAITS(WebKit::WebPopupType) |
61 IPC_ENUM_TRAITS(WebKit::WebTextDirection) | 60 IPC_ENUM_TRAITS(WebKit::WebTextDirection) |
62 IPC_ENUM_TRAITS(WebMenuItem::Type) | 61 IPC_ENUM_TRAITS(WebMenuItem::Type) |
63 IPC_ENUM_TRAITS(WindowContainerType) | 62 IPC_ENUM_TRAITS(WindowContainerType) |
64 IPC_ENUM_TRAITS(ui::TextInputType) | 63 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) |
65 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) | 64 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) |
66 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) | 65 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) |
| 66 IPC_ENUM_TRAITS(content::PageZoom) |
67 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) | 67 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) |
| 68 IPC_ENUM_TRAITS(ui::TextInputType) |
68 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::BoolAttribute) | 69 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::BoolAttribute) |
69 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::FloatAttribute) | 70 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::FloatAttribute) |
70 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::IntAttribute) | 71 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::IntAttribute) |
71 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::Role) | 72 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::Role) |
72 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::State) | 73 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::State) |
73 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::StringAttribute) | 74 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::StringAttribute) |
74 | 75 |
75 IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams) | 76 IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams) |
76 IPC_STRUCT_TRAITS_MEMBER(media_type) | 77 IPC_STRUCT_TRAITS_MEMBER(media_type) |
77 IPC_STRUCT_TRAITS_MEMBER(x) | 78 IPC_STRUCT_TRAITS_MEMBER(x) |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 IPC_STRUCT_TRAITS_MEMBER(toolTip) | 234 IPC_STRUCT_TRAITS_MEMBER(toolTip) |
234 IPC_STRUCT_TRAITS_MEMBER(type) | 235 IPC_STRUCT_TRAITS_MEMBER(type) |
235 IPC_STRUCT_TRAITS_MEMBER(action) | 236 IPC_STRUCT_TRAITS_MEMBER(action) |
236 IPC_STRUCT_TRAITS_MEMBER(rtl) | 237 IPC_STRUCT_TRAITS_MEMBER(rtl) |
237 IPC_STRUCT_TRAITS_MEMBER(has_directional_override) | 238 IPC_STRUCT_TRAITS_MEMBER(has_directional_override) |
238 IPC_STRUCT_TRAITS_MEMBER(enabled) | 239 IPC_STRUCT_TRAITS_MEMBER(enabled) |
239 IPC_STRUCT_TRAITS_MEMBER(checked) | 240 IPC_STRUCT_TRAITS_MEMBER(checked) |
240 IPC_STRUCT_TRAITS_MEMBER(submenu) | 241 IPC_STRUCT_TRAITS_MEMBER(submenu) |
241 IPC_STRUCT_TRAITS_END() | 242 IPC_STRUCT_TRAITS_END() |
242 | 243 |
| 244 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) |
| 245 IPC_STRUCT_TRAITS_MEMBER(mode) |
| 246 IPC_STRUCT_TRAITS_MEMBER(title) |
| 247 IPC_STRUCT_TRAITS_MEMBER(default_file_name) |
| 248 IPC_STRUCT_TRAITS_MEMBER(accept_types) |
| 249 IPC_STRUCT_TRAITS_END() |
| 250 |
243 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams) | 251 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams) |
244 IPC_STRUCT_TRAITS_MEMBER(page_id) | 252 IPC_STRUCT_TRAITS_MEMBER(page_id) |
245 IPC_STRUCT_TRAITS_MEMBER(url) | 253 IPC_STRUCT_TRAITS_MEMBER(url) |
246 IPC_STRUCT_TRAITS_MEMBER(referrer) | 254 IPC_STRUCT_TRAITS_MEMBER(referrer) |
247 IPC_STRUCT_TRAITS_MEMBER(transition) | 255 IPC_STRUCT_TRAITS_MEMBER(transition) |
248 IPC_STRUCT_TRAITS_MEMBER(redirects) | 256 IPC_STRUCT_TRAITS_MEMBER(redirects) |
249 IPC_STRUCT_TRAITS_MEMBER(should_update_history) | 257 IPC_STRUCT_TRAITS_MEMBER(should_update_history) |
250 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) | 258 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) |
251 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) | 259 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) |
252 IPC_STRUCT_TRAITS_MEMBER(password_form) | 260 IPC_STRUCT_TRAITS_MEMBER(password_form) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 IPC_STRUCT_MEMBER(int, http_status_code) | 428 IPC_STRUCT_MEMBER(int, http_status_code) |
421 | 429 |
422 // True if the connection was proxied. In this case, socket_address | 430 // True if the connection was proxied. In this case, socket_address |
423 // will represent the address of the proxy, rather than the remote host. | 431 // will represent the address of the proxy, rather than the remote host. |
424 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) | 432 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) |
425 | 433 |
426 // Serialized history item state to store in the navigation entry. | 434 // Serialized history item state to store in the navigation entry. |
427 IPC_STRUCT_MEMBER(std::string, content_state) | 435 IPC_STRUCT_MEMBER(std::string, content_state) |
428 IPC_STRUCT_END() | 436 IPC_STRUCT_END() |
429 | 437 |
430 IPC_STRUCT_BEGIN(ViewHostMsg_RunFileChooser_Params) | |
431 IPC_STRUCT_MEMBER(ViewHostMsg_RunFileChooser_Mode::Value, mode) | |
432 | |
433 // Title to be used for the dialog. This may be empty for the default title, | |
434 // which will be either "Open" or "Save" depending on the mode. | |
435 IPC_STRUCT_MEMBER(string16, title) | |
436 | |
437 // Default file name to select in the dialog. | |
438 IPC_STRUCT_MEMBER(FilePath, default_file_name) | |
439 | |
440 // A list of valid lower-cased MIME types specified in an input element. It is | |
441 // used to restrict selectable files to such types. | |
442 IPC_STRUCT_MEMBER(std::vector<string16>, accept_types) | |
443 IPC_STRUCT_END() | |
444 | |
445 // This message is used for supporting popup menus on Mac OS X using native | 438 // This message is used for supporting popup menus on Mac OS X using native |
446 // Cocoa controls. The renderer sends us this message which we use to populate | 439 // Cocoa controls. The renderer sends us this message which we use to populate |
447 // the popup menu. | 440 // the popup menu. |
448 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params) | 441 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params) |
449 // Position on the screen. | 442 // Position on the screen. |
450 IPC_STRUCT_MEMBER(gfx::Rect, bounds) | 443 IPC_STRUCT_MEMBER(gfx::Rect, bounds) |
451 | 444 |
452 // The height of each item in the menu. | 445 // The height of each item in the menu. |
453 IPC_STRUCT_MEMBER(int, item_height) | 446 IPC_STRUCT_MEMBER(int, item_height) |
454 | 447 |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 ui::Range /* selection range in the document */) | 1640 ui::Range /* selection range in the document */) |
1648 | 1641 |
1649 // Notification that the selection bounds have changed. | 1642 // Notification that the selection bounds have changed. |
1650 IPC_MESSAGE_ROUTED2(ViewHostMsg_SelectionBoundsChanged, | 1643 IPC_MESSAGE_ROUTED2(ViewHostMsg_SelectionBoundsChanged, |
1651 gfx::Rect /* start rect */, | 1644 gfx::Rect /* start rect */, |
1652 gfx::Rect /* end rect */) | 1645 gfx::Rect /* end rect */) |
1653 | 1646 |
1654 // Asks the browser to display the file chooser. The result is returned in a | 1647 // Asks the browser to display the file chooser. The result is returned in a |
1655 // ViewHost_RunFileChooserResponse message. | 1648 // ViewHost_RunFileChooserResponse message. |
1656 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser, | 1649 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser, |
1657 ViewHostMsg_RunFileChooser_Params) | 1650 content::FileChooserParams) |
1658 | 1651 |
1659 // Asks the browser to enumerate a directory. This is equivalent to running | 1652 // Asks the browser to enumerate a directory. This is equivalent to running |
1660 // the file chooser in directory-enumeration mode and having the user select | 1653 // the file chooser in directory-enumeration mode and having the user select |
1661 // the given directory. The result is returned in a | 1654 // the given directory. The result is returned in a |
1662 // ViewMsg_EnumerateDirectoryResponse message. | 1655 // ViewMsg_EnumerateDirectoryResponse message. |
1663 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory, | 1656 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory, |
1664 int /* request_id */, | 1657 int /* request_id */, |
1665 FilePath /* file_path */) | 1658 FilePath /* file_path */) |
1666 | 1659 |
1667 // Tells the browser to move the focus to the next (previous if reverse is | 1660 // Tells the browser to move the focus to the next (previous if reverse is |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 media::MediaLogEvent /* event */) | 1909 media::MediaLogEvent /* event */) |
1917 | 1910 |
1918 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message | 1911 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message |
1919 // being sent back. | 1912 // being sent back. |
1920 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) | 1913 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) |
1921 | 1914 |
1922 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent | 1915 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent |
1923 // whenever the mouse is unlocked (which may or may not be caused by | 1916 // whenever the mouse is unlocked (which may or may not be caused by |
1924 // ViewHostMsg_UnlockMouse). | 1917 // ViewHostMsg_UnlockMouse). |
1925 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) | 1918 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) |
OLD | NEW |