Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: ppapi/proxy/ppapi_messages.h

Issue 14371021: Implementation of URLLoader using PluginResource/ResourceHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase, track src/webkit gypi changes. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/plugin_resource.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 PP_Bool /* result */) 582 PP_Bool /* result */)
583 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy, 583 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy,
584 PP_Instance /* instance */) 584 PP_Instance /* instance */)
585 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView, 585 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView,
586 PP_Instance /* instance */, 586 PP_Instance /* instance */,
587 ppapi::ViewData /* new_data */, 587 ppapi::ViewData /* new_data */,
588 PP_Bool /* flash_fullscreen */) 588 PP_Bool /* flash_fullscreen */)
589 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus, 589 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus,
590 PP_Instance /* instance */, 590 PP_Instance /* instance */,
591 PP_Bool /* has_focus */) 591 PP_Bool /* has_focus */)
592 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInstance_HandleDocumentLoad, 592 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad,
593 PP_Instance /* instance */, 593 PP_Instance /* instance */,
594 ppapi::HostResource /* url_loader */, 594 int /* pending_loader_host_id */,
595 PP_Bool /* result */) 595 ppapi::URLResponseInfoData /* response */)
596 596
597 // PPP_Messaging. 597 // PPP_Messaging.
598 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage, 598 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage,
599 PP_Instance /* instance */, 599 PP_Instance /* instance */,
600 ppapi::proxy::SerializedVar /* message */) 600 ppapi::proxy::SerializedVar /* message */)
601 601
602 // PPP_MouseLock. 602 // PPP_MouseLock.
603 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost, 603 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost,
604 PP_Instance /* instance */) 604 PP_Instance /* instance */)
605 605
(...skipping 18 matching lines...) Expand all
624 PP_Instance /* instance */) 624 PP_Instance /* instance */)
625 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled, 625 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled,
626 PP_Instance /* instance */, 626 PP_Instance /* instance */,
627 bool /* result */) 627 bool /* result */)
628 628
629 // PPP_TextInput. 629 // PPP_TextInput.
630 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText, 630 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText,
631 PP_Instance /* instance */, 631 PP_Instance /* instance */,
632 uint32_t /* desired_number_of_characters */) 632 uint32_t /* desired_number_of_characters */)
633 633
634 // PPB_URLLoader
635 // (Messages from browser to plugin to notify it of changes in state.)
636 //
637 // NOTE: The ReadResponseBody_Ack message is a custom generated message
638 // with the following fields appended:
639 // ppapi::HostResource
640 // response data (array of bytes stored via WriteData)
641 // int result
642 //
643 IPC_MESSAGE_ROUTED0(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack)
644 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBURLLoader_CallbackComplete,
645 ppapi::HostResource /* loader */,
646 int32_t /* result */)
647 #if !defined(OS_NACL) && !defined(NACL_WIN64) 634 #if !defined(OS_NACL) && !defined(NACL_WIN64)
648 // PPB_Broker. 635 // PPB_Broker.
649 IPC_MESSAGE_ROUTED3( 636 IPC_MESSAGE_ROUTED3(
650 PpapiMsg_PPBBroker_ConnectComplete, 637 PpapiMsg_PPBBroker_ConnectComplete,
651 ppapi::HostResource /* broker */, 638 ppapi::HostResource /* broker */,
652 IPC::PlatformFileForTransit /* handle */, 639 IPC::PlatformFileForTransit /* handle */,
653 int32_t /* result */) 640 int32_t /* result */)
654 641
655 // PPP_ContentDecryptor_Dev 642 // PPP_ContentDecryptor_Dev
656 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_GenerateKeyRequest, 643 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_GenerateKeyRequest,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_WriteACK, 702 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBTCPSocket_WriteACK,
716 uint32 /* plugin_dispatcher_id */, 703 uint32 /* plugin_dispatcher_id */,
717 uint32 /* socket_id */, 704 uint32 /* socket_id */,
718 bool /* succeeded */, 705 bool /* succeeded */,
719 int32_t /* bytes_written */) 706 int32_t /* bytes_written */)
720 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_SetBoolOptionACK, 707 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBTCPSocket_SetBoolOptionACK,
721 uint32 /* plugin_dispatcher_id */, 708 uint32 /* plugin_dispatcher_id */,
722 uint32 /* socket_id */, 709 uint32 /* socket_id */,
723 bool /* succeeded */) 710 bool /* succeeded */)
724 711
725 // PPB_URLLoader_Trusted
726 IPC_MESSAGE_ROUTED1(
727 PpapiMsg_PPBURLLoader_UpdateProgress,
728 ppapi::proxy::PPBURLLoader_UpdateProgress_Params /* params */)
729
730 // PPB_TCPServerSocket_Private. 712 // PPB_TCPServerSocket_Private.
731 713
732 // |socket_resource| should not be used as Resource in browser. The 714 // |socket_resource| should not be used as Resource in browser. The
733 // only purpose of this argument is to be echoed back. 715 // only purpose of this argument is to be echoed back.
734 // |status| == PP_ERROR_NOSPACE means that the socket table is full 716 // |status| == PP_ERROR_NOSPACE means that the socket table is full
735 // and new socket can't be initialized. 717 // and new socket can't be initialized.
736 // |status| == PP_ERROR_FAILED means that socket is correctly 718 // |status| == PP_ERROR_FAILED means that socket is correctly
737 // initialized (if needed) but Listen call is failed. 719 // initialized (if needed) but Listen call is failed.
738 // |status| == PP_OK means that socket is correctly initialized (if 720 // |status| == PP_OK means that socket is correctly initialized (if
739 // needed) and Listen call succeeds. 721 // needed) and Listen call succeeds.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 PP_Rect /* caret */, 977 PP_Rect /* caret */,
996 PP_Rect /* bounding_box */) 978 PP_Rect /* bounding_box */)
997 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText, 979 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText,
998 PP_Instance /* instance */) 980 PP_Instance /* instance */)
999 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText, 981 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText,
1000 PP_Instance /* instance */, 982 PP_Instance /* instance */,
1001 std::string /* text */, 983 std::string /* text */,
1002 uint32_t /* caret */, 984 uint32_t /* caret */,
1003 uint32_t /* anchor */) 985 uint32_t /* anchor */)
1004 986
1005 // PPB_URLLoader.
1006 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLLoader_Create,
1007 PP_Instance /* instance */,
1008 ppapi::HostResource /* result */)
1009 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_Open,
1010 ppapi::HostResource /* loader */,
1011 ppapi::URLRequestInfoData /* request_data */)
1012 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_FollowRedirect,
1013 ppapi::HostResource /* loader */)
1014 IPC_SYNC_MESSAGE_ROUTED1_2(
1015 PpapiHostMsg_PPBURLLoader_GetResponseInfo,
1016 ppapi::HostResource /* loader */,
1017 bool /* success */,
1018 ppapi::URLResponseInfoData /* result */)
1019 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBURLLoader_ReadResponseBody,
1020 ppapi::HostResource /* loader */,
1021 int32_t /* bytes_to_read */)
1022 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_FinishStreamingToFile,
1023 ppapi::HostResource /* loader */)
1024 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_Close,
1025 ppapi::HostResource /* loader */)
1026 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoader_GrantUniversalAccess,
1027 ppapi::HostResource /* loader */)
1028
1029 // PPB_Var. 987 // PPB_Var.
1030 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject, 988 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject,
1031 int64 /* object_id */, 989 int64 /* object_id */,
1032 int /* unused - need a return value for sync msgs */) 990 int /* unused - need a return value for sync msgs */)
1033 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, 991 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject,
1034 int64 /* object_id */) 992 int64 /* object_id */)
1035 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty, 993 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty,
1036 ppapi::proxy::SerializedVar /* object */, 994 ppapi::proxy::SerializedVar /* object */,
1037 ppapi::proxy::SerializedVar /* property */, 995 ppapi::proxy::SerializedVar /* property */,
1038 ppapi::proxy::SerializedVar /* out_exception */, 996 ppapi::proxy::SerializedVar /* out_exception */,
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolverPrivate_ResolveReply, 1462 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolverPrivate_ResolveReply,
1505 std::string /* canonical_name */, 1463 std::string /* canonical_name */,
1506 std::vector<PP_NetAddress_Private> /* net_address_list */) 1464 std::vector<PP_NetAddress_Private> /* net_address_list */)
1507 1465
1508 // Printing. 1466 // Printing.
1509 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) 1467 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create)
1510 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) 1468 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings)
1511 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, 1469 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply,
1512 PP_PrintSettings_Dev /* print_settings */) 1470 PP_PrintSettings_Dev /* print_settings */)
1513 1471
1472 // URLLoader ------------------------------------------------------------------
1473
1474 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create)
1475
1476 // These messages correspond to PPAPI calls and all should get a
1477 // CallbackComplete message.
1478 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open,
1479 ppapi::URLRequestInfoData /* request_data */)
1480
1481 // The plugin can tell the host to defer a load to hold off on sending more
1482 // data because the buffer in the plugin is full. When defers_loading is set to
1483 // false, data streaming will resume.
1484 //
1485 // When auditing redirects (no auto follow) the load will be automatically
1486 // deferred each time we get a redirect. The plugin will reset this to false
1487 // by sending this message when it wants to continue following the redirect.
1488 //
1489 // When streaming data, the host may still send more data after this call (for
1490 // example, it could already be in-flight at the time of this request).
1491 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading,
1492 bool /* defers_loading */)
1493
1494 // Closes the URLLoader. There is no reply.
1495 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close)
1496
1497 // Requests that cross-site restrictions be ignored. The plugin must have
1498 // the private permission set. Otherwise this message will be ignored by the
1499 // renderer. There is no reply.
1500 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess)
1501
1502 // Push notification that a response is available.
1503 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse,
1504 ppapi::URLResponseInfoData /* response */)
1505
1506 // Push notification with load data from the renderer. It is a custom generated
1507 // message with the response data (array of bytes stored via WriteData)
1508 // appended.
1509 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData)
1510
1511 // Push notification indicating that all data has been sent, either via
1512 // SendData or by streaming it to a file. Note that since this is a push
1513 // notification, we don't use the result field of the ResourceMessageReply.
1514 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading,
1515 int32_t /* result */)
1516
1517 // Push notification from the renderer to the plugin to tell it about download
1518 // and upload progress. This will only be sent if the plugin has requested
1519 // progress updates, and only the fields requested by the plugin will be
1520 // valid.
1521 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress,
1522 int64_t /* bytes_sent */,
1523 int64_t /* total_bytes_to_be_sent */,
1524 int64_t /* bytes_received */,
1525 int64_t /* total_bytes_to_be_received */)
1526
1514 // Shared memory --------------------------------------------------------------- 1527 // Shared memory ---------------------------------------------------------------
1528
1515 // Creates shared memory on the host side, returning a handle to the shared 1529 // Creates shared memory on the host side, returning a handle to the shared
1516 // memory on the plugin and keeping the memory mapped in on the host. 1530 // memory on the plugin and keeping the memory mapped in on the host.
1517 // We return a "host handle_id" that can be mapped back to the 1531 // We return a "host handle_id" that can be mapped back to the
1518 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle(). 1532 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle().
1519 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory, 1533 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory,
1520 PP_Instance /* instance */, 1534 PP_Instance /* instance */,
1521 uint32_t /* size */, 1535 uint32_t /* size */,
1522 int /* host_handle_id */, 1536 int /* host_handle_id */,
1523 ppapi::proxy::SerializedHandle /* plugin_handle */) 1537 ppapi::proxy::SerializedHandle /* plugin_handle */)
1524 1538
1525 // WebSocket ------------------------------------------------------------------ 1539 // WebSocket -------------------------------------------------------------------
1540
1526 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) 1541 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create)
1527 1542
1528 // Establishes the connection to a server. This message requires 1543 // Establishes the connection to a server. This message requires
1529 // WebSocket_ConnectReply as a reply message. 1544 // WebSocket_ConnectReply as a reply message.
1530 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, 1545 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect,
1531 std::string /* url */, 1546 std::string /* url */,
1532 std::vector<std::string> /* protocols */) 1547 std::vector<std::string> /* protocols */)
1533 1548
1534 // Closes established connection with graceful closing handshake. This message 1549 // Closes established connection with graceful closing handshake. This message
1535 // requires WebSocket_CloseReply as a reply message. 1550 // requires WebSocket_CloseReply as a reply message.
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply) 1894 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply)
1880 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame) 1895 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame)
1881 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_VideoSource_GetFrameReply, 1896 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_VideoSource_GetFrameReply,
1882 ppapi::HostResource /* resource_id */, 1897 ppapi::HostResource /* resource_id */,
1883 PP_ImageDataDesc /* image_data_desc */, 1898 PP_ImageDataDesc /* image_data_desc */,
1884 int /* fd */, 1899 int /* fd */,
1885 PP_TimeTicks /* timestamp */) 1900 PP_TimeTicks /* timestamp */)
1886 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close) 1901 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close)
1887 1902
1888 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) 1903 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_resource.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698