| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "cc/output/begin_frame_args.h" | 11 #include "cc/output/begin_frame_args.h" |
| 12 #include "cc/output/compositor_frame.h" | 12 #include "cc/output/compositor_frame.h" |
| 13 #include "cc/output/compositor_frame_ack.h" | 13 #include "cc/output/compositor_frame_ack.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/common/content_param_traits.h" | 15 #include "content/common/content_param_traits.h" |
| 16 #include "content/common/cookie_data.h" | 16 #include "content/common/cookie_data.h" |
| 17 #include "content/common/date_time_suggestion.h" | 17 #include "content/common/date_time_suggestion.h" |
| 18 #include "content/common/navigation_gesture.h" | 18 #include "content/common/navigation_gesture.h" |
| 19 #include "content/common/pepper_renderer_instance_data.h" | |
| 20 #include "content/common/view_message_enums.h" | 19 #include "content/common/view_message_enums.h" |
| 21 #include "content/common/webplugin_geometry.h" | 20 #include "content/common/webplugin_geometry.h" |
| 22 #include "content/public/common/common_param_traits.h" | 21 #include "content/public/common/common_param_traits.h" |
| 23 #include "content/public/common/favicon_url.h" | 22 #include "content/public/common/favicon_url.h" |
| 24 #include "content/public/common/file_chooser_params.h" | 23 #include "content/public/common/file_chooser_params.h" |
| 25 #include "content/public/common/menu_item.h" | 24 #include "content/public/common/menu_item.h" |
| 26 #include "content/public/common/page_state.h" | 25 #include "content/public/common/page_state.h" |
| 27 #include "content/public/common/page_zoom.h" | 26 #include "content/public/common/page_zoom.h" |
| 28 #include "content/public/common/referrer.h" | 27 #include "content/public/common/referrer.h" |
| 29 #include "content/public/common/renderer_preferences.h" | 28 #include "content/public/common/renderer_preferences.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 56 #include "ui/gfx/rect_f.h" | 55 #include "ui/gfx/rect_f.h" |
| 57 #include "ui/gfx/vector2d.h" | 56 #include "ui/gfx/vector2d.h" |
| 58 #include "ui/gfx/vector2d_f.h" | 57 #include "ui/gfx/vector2d_f.h" |
| 59 #include "ui/shell_dialogs/selected_file_info.h" | 58 #include "ui/shell_dialogs/selected_file_info.h" |
| 60 | 59 |
| 61 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
| 62 #include "content/common/mac/font_descriptor.h" | 61 #include "content/common/mac/font_descriptor.h" |
| 63 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | 62 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" |
| 64 #endif | 63 #endif |
| 65 | 64 |
| 65 #if defined(ENABLE_PLUGINS) |
| 66 #include "content/common/pepper_renderer_instance_data.h" |
| 67 #endif |
| 68 |
| 66 #undef IPC_MESSAGE_EXPORT | 69 #undef IPC_MESSAGE_EXPORT |
| 67 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 70 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 68 | 71 |
| 69 #define IPC_MESSAGE_START ViewMsgStart | 72 #define IPC_MESSAGE_START ViewMsgStart |
| 70 | 73 |
| 71 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type) | 74 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type) |
| 72 IPC_ENUM_TRAITS(blink::WebPluginAction::Type) | 75 IPC_ENUM_TRAITS(blink::WebPluginAction::Type) |
| 73 IPC_ENUM_TRAITS(blink::WebPopupType) | 76 IPC_ENUM_TRAITS(blink::WebPopupType) |
| 74 IPC_ENUM_TRAITS(blink::WebTextDirection) | 77 IPC_ENUM_TRAITS(blink::WebTextDirection) |
| 75 IPC_ENUM_TRAITS(WindowContainerType) | 78 IPC_ENUM_TRAITS(WindowContainerType) |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) | 166 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) |
| 164 IPC_STRUCT_TRAITS_MEMBER(mode) | 167 IPC_STRUCT_TRAITS_MEMBER(mode) |
| 165 IPC_STRUCT_TRAITS_MEMBER(title) | 168 IPC_STRUCT_TRAITS_MEMBER(title) |
| 166 IPC_STRUCT_TRAITS_MEMBER(default_file_name) | 169 IPC_STRUCT_TRAITS_MEMBER(default_file_name) |
| 167 IPC_STRUCT_TRAITS_MEMBER(accept_types) | 170 IPC_STRUCT_TRAITS_MEMBER(accept_types) |
| 168 #if defined(OS_ANDROID) | 171 #if defined(OS_ANDROID) |
| 169 IPC_STRUCT_TRAITS_MEMBER(capture) | 172 IPC_STRUCT_TRAITS_MEMBER(capture) |
| 170 #endif | 173 #endif |
| 171 IPC_STRUCT_TRAITS_END() | 174 IPC_STRUCT_TRAITS_END() |
| 172 | 175 |
| 176 #if defined(ENABLE_PLUGINS) |
| 173 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData) | 177 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData) |
| 174 IPC_STRUCT_TRAITS_MEMBER(render_process_id) | 178 IPC_STRUCT_TRAITS_MEMBER(render_process_id) |
| 175 IPC_STRUCT_TRAITS_MEMBER(render_frame_id) | 179 IPC_STRUCT_TRAITS_MEMBER(render_frame_id) |
| 176 IPC_STRUCT_TRAITS_MEMBER(document_url) | 180 IPC_STRUCT_TRAITS_MEMBER(document_url) |
| 177 IPC_STRUCT_TRAITS_MEMBER(plugin_url) | 181 IPC_STRUCT_TRAITS_MEMBER(plugin_url) |
| 178 IPC_STRUCT_TRAITS_END() | 182 IPC_STRUCT_TRAITS_END() |
| 183 #endif |
| 179 | 184 |
| 180 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) | 185 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) |
| 181 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) | 186 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) |
| 182 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) | 187 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) |
| 183 IPC_STRUCT_TRAITS_MEMBER(hinting) | 188 IPC_STRUCT_TRAITS_MEMBER(hinting) |
| 184 IPC_STRUCT_TRAITS_MEMBER(use_autohinter) | 189 IPC_STRUCT_TRAITS_MEMBER(use_autohinter) |
| 185 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) | 190 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) |
| 186 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) | 191 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) |
| 187 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) | 192 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) |
| 188 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) | 193 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 801 |
| 797 // Sent when the worker has connected. | 802 // Sent when the worker has connected. |
| 798 // This message is sent only if the worker successfully loaded the script. | 803 // This message is sent only if the worker successfully loaded the script. |
| 799 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected) | 804 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected) |
| 800 | 805 |
| 801 // Tells the renderer that the network type has changed so that navigator.onLine | 806 // Tells the renderer that the network type has changed so that navigator.onLine |
| 802 // and navigator.connection can be updated. | 807 // and navigator.connection can be updated. |
| 803 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged, | 808 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged, |
| 804 net::NetworkChangeNotifier::ConnectionType /* type */) | 809 net::NetworkChangeNotifier::ConnectionType /* type */) |
| 805 | 810 |
| 811 #if defined(ENABLE_PLUGINS) |
| 806 // Reply to ViewHostMsg_OpenChannelToPpapiBroker | 812 // Reply to ViewHostMsg_OpenChannelToPpapiBroker |
| 807 // Tells the renderer that the channel to the broker has been created. | 813 // Tells the renderer that the channel to the broker has been created. |
| 808 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated, | 814 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated, |
| 809 base::ProcessId /* broker_pid */, | 815 base::ProcessId /* broker_pid */, |
| 810 IPC::ChannelHandle /* handle */) | 816 IPC::ChannelHandle /* handle */) |
| 811 | 817 |
| 812 // Reply to ViewHostMsg_RequestPpapiBrokerPermission. | 818 // Reply to ViewHostMsg_RequestPpapiBrokerPermission. |
| 813 // Tells the renderer whether permission to access to PPAPI broker was granted | 819 // Tells the renderer whether permission to access to PPAPI broker was granted |
| 814 // or not. | 820 // or not. |
| 815 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult, | 821 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult, |
| 816 bool /* result */) | 822 bool /* result */) |
| 817 | 823 |
| 818 // Tells the renderer to empty its plugin list cache, optional reloading | 824 // Tells the renderer to empty its plugin list cache, optional reloading |
| 819 // pages containing plugins. | 825 // pages containing plugins. |
| 820 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache, | 826 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache, |
| 821 bool /* reload_pages */) | 827 bool /* reload_pages */) |
| 828 #endif |
| 822 | 829 |
| 823 // Used to instruct the RenderView to go into "view source" mode. | 830 // Used to instruct the RenderView to go into "view source" mode. |
| 824 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) | 831 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) |
| 825 | 832 |
| 826 // Instructs the renderer to save the current page to MHTML. | 833 // Instructs the renderer to save the current page to MHTML. |
| 827 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML, | 834 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML, |
| 828 int /* job_id */, | 835 int /* job_id */, |
| 829 IPC::PlatformFileForTransit /* file handle */) | 836 IPC::PlatformFileForTransit /* file handle */) |
| 830 | 837 |
| 831 // Temporary message to diagnose an unexpected condition in WebContentsImpl. | 838 // Temporary message to diagnose an unexpected condition in WebContentsImpl. |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers, | 1236 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers, |
| 1230 bool /* has_handlers */) | 1237 bool /* has_handlers */) |
| 1231 | 1238 |
| 1232 // A message from HTML-based UI. When (trusted) Javascript calls | 1239 // A message from HTML-based UI. When (trusted) Javascript calls |
| 1233 // send(message, args), this message is sent to the browser. | 1240 // send(message, args), this message is sent to the browser. |
| 1234 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend, | 1241 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend, |
| 1235 GURL /* source_url */, | 1242 GURL /* source_url */, |
| 1236 std::string /* message */, | 1243 std::string /* message */, |
| 1237 base::ListValue /* args */) | 1244 base::ListValue /* args */) |
| 1238 | 1245 |
| 1246 #if defined(ENABLE_PLUGINS) |
| 1239 // A renderer sends this to the browser process when it wants to create a ppapi | 1247 // A renderer sends this to the browser process when it wants to create a ppapi |
| 1240 // plugin. The browser will create the plugin process if necessary, and will | 1248 // plugin. The browser will create the plugin process if necessary, and will |
| 1241 // return a handle to the channel on success. | 1249 // return a handle to the channel on success. |
| 1242 // | 1250 // |
| 1243 // The plugin_child_id is the ChildProcessHost ID assigned in the browser | 1251 // The plugin_child_id is the ChildProcessHost ID assigned in the browser |
| 1244 // process. This ID is valid only in the context of the browser process and is | 1252 // process. This ID is valid only in the context of the browser process and is |
| 1245 // used to identify the proper process when the renderer notifies it that the | 1253 // used to identify the proper process when the renderer notifies it that the |
| 1246 // plugin is hung. | 1254 // plugin is hung. |
| 1247 // | 1255 // |
| 1248 // On error an empty string and null handles are returned. | 1256 // On error an empty string and null handles are returned. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 base::FilePath /* path */) | 1309 base::FilePath /* path */) |
| 1302 | 1310 |
| 1303 // A renderer sends this to the browser process when it wants to access a PPAPI | 1311 // A renderer sends this to the browser process when it wants to access a PPAPI |
| 1304 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called | 1312 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called |
| 1305 // for every connection. | 1313 // for every connection. |
| 1306 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult. | 1314 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult. |
| 1307 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission, | 1315 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission, |
| 1308 int /* routing_id */, | 1316 int /* routing_id */, |
| 1309 GURL /* document_url */, | 1317 GURL /* document_url */, |
| 1310 base::FilePath /* plugin_path */) | 1318 base::FilePath /* plugin_path */) |
| 1319 #endif // defined(ENABLE_PLUGINS) |
| 1311 | 1320 |
| 1312 // Send the tooltip text for the current mouse position to the browser. | 1321 // Send the tooltip text for the current mouse position to the browser. |
| 1313 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, | 1322 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, |
| 1314 base::string16 /* tooltip text string */, | 1323 base::string16 /* tooltip text string */, |
| 1315 blink::WebTextDirection /* text direction hint */) | 1324 blink::WebTextDirection /* text direction hint */) |
| 1316 | 1325 |
| 1317 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK) | 1326 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK) |
| 1318 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK) | 1327 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK) |
| 1319 | 1328 |
| 1320 // Notification that the text selection has changed. | 1329 // Notification that the text selection has changed. |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1618 // Since the browser keeps handles to the allocated transport DIBs, this | 1627 // Since the browser keeps handles to the allocated transport DIBs, this |
| 1619 // message is sent to tell the browser that it may release them when the | 1628 // message is sent to tell the browser that it may release them when the |
| 1620 // renderer is finished with them. | 1629 // renderer is finished with them. |
| 1621 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 1630 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
| 1622 TransportDIB::Id /* DIB id */) | 1631 TransportDIB::Id /* DIB id */) |
| 1623 #endif | 1632 #endif |
| 1624 | 1633 |
| 1625 // Adding a new message? Stick to the sort order above: first platform | 1634 // Adding a new message? Stick to the sort order above: first platform |
| 1626 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1635 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 1627 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1636 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |