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 // Multiply-included message header, no traditional include guard. | 5 // Multiply-included message header, no traditional include guard. |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 PP_Bool /* result */) | 574 PP_Bool /* result */) |
575 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy, | 575 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy, |
576 PP_Instance /* instance */) | 576 PP_Instance /* instance */) |
577 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView, | 577 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView, |
578 PP_Instance /* instance */, | 578 PP_Instance /* instance */, |
579 ppapi::ViewData /* new_data */, | 579 ppapi::ViewData /* new_data */, |
580 PP_Bool /* flash_fullscreen */) | 580 PP_Bool /* flash_fullscreen */) |
581 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus, | 581 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus, |
582 PP_Instance /* instance */, | 582 PP_Instance /* instance */, |
583 PP_Bool /* has_focus */) | 583 PP_Bool /* has_focus */) |
584 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInstance_HandleDocumentLoad, | 584 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad, |
585 PP_Instance /* instance */, | 585 PP_Instance /* instance */, |
586 ppapi::HostResource /* url_loader */, | 586 int /* pending_loader_host_id */, |
587 PP_Bool /* result */) | 587 ppapi::URLResponseInfoData /* response */) |
588 | 588 |
589 // PPP_Messaging. | 589 // PPP_Messaging. |
590 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage, | 590 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage, |
591 PP_Instance /* instance */, | 591 PP_Instance /* instance */, |
592 ppapi::proxy::SerializedVar /* message */) | 592 ppapi::proxy::SerializedVar /* message */) |
593 | 593 |
594 // PPP_MouseLock. | 594 // PPP_MouseLock. |
595 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost, | 595 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost, |
596 PP_Instance /* instance */) | 596 PP_Instance /* instance */) |
597 | 597 |
(...skipping 18 matching lines...) Expand all Loading... |
616 PP_Instance /* instance */) | 616 PP_Instance /* instance */) |
617 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled, | 617 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled, |
618 PP_Instance /* instance */, | 618 PP_Instance /* instance */, |
619 bool /* result */) | 619 bool /* result */) |
620 | 620 |
621 // PPP_TextInput. | 621 // PPP_TextInput. |
622 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText, | 622 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText, |
623 PP_Instance /* instance */, | 623 PP_Instance /* instance */, |
624 uint32_t /* desired_number_of_characters */) | 624 uint32_t /* desired_number_of_characters */) |
625 | 625 |
626 // PPB_URLLoader | |
627 // (Messages from browser to plugin to notify it of changes in state.) | |
628 // | |
629 // NOTE: The ReadResponseBody_Ack message is a custom generated message | |
630 // with the following fields appended: | |
631 // ppapi::HostResource | |
632 // response data (array of bytes stored via WriteData) | |
633 // int result | |
634 // | |
635 IPC_MESSAGE_ROUTED0(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack) | |
636 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBURLLoader_CallbackComplete, | |
637 ppapi::HostResource /* loader */, | |
638 int32_t /* result */) | |
639 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 626 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
640 // PPB_Broker. | 627 // PPB_Broker. |
641 IPC_MESSAGE_ROUTED3( | 628 IPC_MESSAGE_ROUTED3( |
642 PpapiMsg_PPBBroker_ConnectComplete, | 629 PpapiMsg_PPBBroker_ConnectComplete, |
643 ppapi::HostResource /* broker */, | 630 ppapi::HostResource /* broker */, |
644 IPC::PlatformFileForTransit /* handle */, | 631 IPC::PlatformFileForTransit /* handle */, |
645 int32_t /* result */) | 632 int32_t /* result */) |
646 | 633 |
647 // PPP_ContentDecryptor_Dev | 634 // PPP_ContentDecryptor_Dev |
648 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_GenerateKeyRequest, | 635 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_GenerateKeyRequest, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_WriteACK, | 694 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_WriteACK, |
708 uint32 /* plugin_dispatcher_id */, | 695 uint32 /* plugin_dispatcher_id */, |
709 uint32 /* socket_id */, | 696 uint32 /* socket_id */, |
710 bool /* succeeded */, | 697 bool /* succeeded */, |
711 int32_t /* bytes_written */) | 698 int32_t /* bytes_written */) |
712 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_SetBoolOptionACK, | 699 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_SetBoolOptionACK, |
713 uint32 /* plugin_dispatcher_id */, | 700 uint32 /* plugin_dispatcher_id */, |
714 uint32 /* socket_id */, | 701 uint32 /* socket_id */, |
715 bool /* succeeded */) | 702 bool /* succeeded */) |
716 | 703 |
717 // PPB_URLLoader_Trusted | |
718 IPC_MESSAGE_ROUTED1( | |
719 PpapiMsg_PPBURLLoader_UpdateProgress, | |
720 ppapi::proxy::PPBURLLoader_UpdateProgress_Params /* params */) | |
721 | |
722 // PPB_TCPServerSocket_Private. | 704 // PPB_TCPServerSocket_Private. |
723 | 705 |
724 // |socket_resource| should not be used as Resource in browser. The | 706 // |socket_resource| should not be used as Resource in browser. The |
725 // only purpose of this argument is to be echoed back. | 707 // only purpose of this argument is to be echoed back. |
726 // |status| == PP_ERROR_NOSPACE means that the socket table is full | 708 // |status| == PP_ERROR_NOSPACE means that the socket table is full |
727 // and new socket can't be initialized. | 709 // and new socket can't be initialized. |
728 // |status| == PP_ERROR_FAILED means that socket is correctly | 710 // |status| == PP_ERROR_FAILED means that socket is correctly |
729 // initialized (if needed) but Listen call is failed. | 711 // initialized (if needed) but Listen call is failed. |
730 // |status| == PP_OK means that socket is correctly initialized (if | 712 // |status| == PP_OK means that socket is correctly initialized (if |
731 // needed) and Listen call succeeds. | 713 // needed) and Listen call succeeds. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 PP_Rect /* caret */, | 969 PP_Rect /* caret */, |
988 PP_Rect /* bounding_box */) | 970 PP_Rect /* bounding_box */) |
989 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText, | 971 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText, |
990 PP_Instance /* instance */) | 972 PP_Instance /* instance */) |
991 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText, | 973 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText, |
992 PP_Instance /* instance */, | 974 PP_Instance /* instance */, |
993 std::string /* text */, | 975 std::string /* text */, |
994 uint32_t /* caret */, | 976 uint32_t /* caret */, |
995 uint32_t /* anchor */) | 977 uint32_t /* anchor */) |
996 | 978 |
997 // PPB_URLLoader. | |
998 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLLoader_Create, | |
999 PP_Instance /* instance */, | |
1000 ppapi::HostResource /* result */) | |
1001 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_Open, | |
1002 ppapi::HostResource /* loader */, | |
1003 ppapi::URLRequestInfoData /* request_data */) | |
1004 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_FollowRedirect, | |
1005 ppapi::HostResource /* loader */) | |
1006 IPC_SYNC_MESSAGE_ROUTED1_2( | |
1007 PpapiHostMsg_PPBURLLoader_GetResponseInfo, | |
1008 ppapi::HostResource /* loader */, | |
1009 bool /* success */, | |
1010 ppapi::URLResponseInfoData /* result */) | |
1011 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_ReadResponseBody, | |
1012 ppapi::HostResource /* loader */, | |
1013 int32_t /* bytes_to_read */) | |
1014 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_FinishStreamingToFile, | |
1015 ppapi::HostResource /* loader */) | |
1016 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_Close, | |
1017 ppapi::HostResource /* loader */) | |
1018 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_GrantUniversalAccess, | |
1019 ppapi::HostResource /* loader */) | |
1020 | |
1021 // PPB_Var. | 979 // PPB_Var. |
1022 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject, | 980 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject, |
1023 int64 /* object_id */, | 981 int64 /* object_id */, |
1024 int /* unused - need a return value for sync msgs */) | 982 int /* unused - need a return value for sync msgs */) |
1025 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, | 983 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, |
1026 int64 /* object_id */) | 984 int64 /* object_id */) |
1027 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty, | 985 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty, |
1028 ppapi::proxy::SerializedVar /* object */, | 986 ppapi::proxy::SerializedVar /* object */, |
1029 ppapi::proxy::SerializedVar /* property */, | 987 ppapi::proxy::SerializedVar /* property */, |
1030 ppapi::proxy::SerializedVar /* out_exception */, | 988 ppapi::proxy::SerializedVar /* out_exception */, |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolverPrivate_ResolveReply, | 1446 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolverPrivate_ResolveReply, |
1489 std::string /* canonical_name */, | 1447 std::string /* canonical_name */, |
1490 std::vector<PP_NetAddress_Private> /* net_address_list */) | 1448 std::vector<PP_NetAddress_Private> /* net_address_list */) |
1491 | 1449 |
1492 // Printing. | 1450 // Printing. |
1493 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) | 1451 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) |
1494 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) | 1452 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) |
1495 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, | 1453 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, |
1496 PP_PrintSettings_Dev /* print_settings */) | 1454 PP_PrintSettings_Dev /* print_settings */) |
1497 | 1455 |
| 1456 // URLLoader ------------------------------------------------------------------ |
| 1457 |
| 1458 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create) |
| 1459 |
| 1460 // These messages correspond to PPAPI calls and all should get a |
| 1461 // CallbackComplete message. |
| 1462 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open, |
| 1463 ppapi::URLRequestInfoData /* request_data */) |
| 1464 |
| 1465 // The plugin can tell the host to defer a load to hold off on sending more |
| 1466 // data because the buffer in the plugin is full. When defers_loading is set to |
| 1467 // false, data streaming will resume. |
| 1468 // |
| 1469 // When auditing redirects (no auto follow) the load will be automatically |
| 1470 // deferred each time we get a redirect. The plugin will reset this to false |
| 1471 // by sending this message when it wants to continue following the redirect. |
| 1472 // |
| 1473 // When streaming data, the host may still send more data after this call (for |
| 1474 // example, it could already be in-flight at the time of this request). |
| 1475 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading, |
| 1476 bool /* defers_loading */) |
| 1477 |
| 1478 // Closes the URLLoader. There is no reply. |
| 1479 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close) |
| 1480 |
| 1481 // Requests that cross-site restrictions be ignored. The plugin must have |
| 1482 // the private permission set. Otherwise this message will be ignored by the |
| 1483 // renderer. There is no reply. |
| 1484 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess) |
| 1485 |
| 1486 // Push notification that a response is available. |
| 1487 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse, |
| 1488 ppapi::URLResponseInfoData /* response */) |
| 1489 |
| 1490 // Push notification with load data from the renderer. It is a custom generated |
| 1491 // message with the response data (array of bytes stored via WriteData) |
| 1492 // appended. |
| 1493 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData) |
| 1494 |
| 1495 // Push notification indicating that all data has been sent, either via |
| 1496 // SendData or by streaming it to a file. Note that since this is a push |
| 1497 // notification, we don't use the result field of the ResourceMessageReply. |
| 1498 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading, |
| 1499 int32_t /* result */) |
| 1500 |
| 1501 // Push notification from the renderer to the plugin to tell it about download |
| 1502 // and upload progress. This will only be sent if the plugin has requested |
| 1503 // progress updates, and only the fields requested by the plugin will be |
| 1504 // valid. |
| 1505 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress, |
| 1506 int64_t /* bytes_sent */, |
| 1507 int64_t /* total_bytes_to_be_sent */, |
| 1508 int64_t /* bytes_received */, |
| 1509 int64_t /* total_bytes_to_be_received */) |
| 1510 |
1498 // Shared memory --------------------------------------------------------------- | 1511 // Shared memory --------------------------------------------------------------- |
| 1512 |
1499 // Creates shared memory on the host side, returning a handle to the shared | 1513 // Creates shared memory on the host side, returning a handle to the shared |
1500 // memory on the plugin and keeping the memory mapped in on the host. | 1514 // memory on the plugin and keeping the memory mapped in on the host. |
1501 // We return a "host handle_id" that can be mapped back to the | 1515 // We return a "host handle_id" that can be mapped back to the |
1502 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle(). | 1516 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle(). |
1503 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory, | 1517 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory, |
1504 PP_Instance /* instance */, | 1518 PP_Instance /* instance */, |
1505 uint32_t /* size */, | 1519 uint32_t /* size */, |
1506 int /* host_handle_id */, | 1520 int /* host_handle_id */, |
1507 ppapi::proxy::SerializedHandle /* plugin_handle */) | 1521 ppapi::proxy::SerializedHandle /* plugin_handle */) |
1508 | 1522 |
1509 // WebSocket ------------------------------------------------------------------ | 1523 // WebSocket ------------------------------------------------------------------- |
| 1524 |
1510 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) | 1525 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) |
1511 | 1526 |
1512 // Establishes the connection to a server. This message requires | 1527 // Establishes the connection to a server. This message requires |
1513 // WebSocket_ConnectReply as a reply message. | 1528 // WebSocket_ConnectReply as a reply message. |
1514 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, | 1529 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, |
1515 std::string /* url */, | 1530 std::string /* url */, |
1516 std::vector<std::string> /* protocols */) | 1531 std::vector<std::string> /* protocols */) |
1517 | 1532 |
1518 // Closes established connection with graceful closing handshake. This message | 1533 // Closes established connection with graceful closing handshake. This message |
1519 // requires WebSocket_CloseReply as a reply message. | 1534 // requires WebSocket_CloseReply as a reply message. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open, | 1876 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open, |
1862 std::string /* stream_url */) | 1877 std::string /* stream_url */) |
1863 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply) | 1878 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply) |
1864 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame) | 1879 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame) |
1865 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VideoSource_GetFrameReply, | 1880 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VideoSource_GetFrameReply, |
1866 ppapi::HostResource /* image_data */, | 1881 ppapi::HostResource /* image_data */, |
1867 PP_TimeTicks /* timestamp */) | 1882 PP_TimeTicks /* timestamp */) |
1868 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close) | 1883 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close) |
1869 | 1884 |
1870 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) | 1885 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
OLD | NEW |