| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 extensions. | 5 // IPC messages for extensions. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "content/public/common/common_param_traits.h" | 13 #include "content/public/common/common_param_traits.h" |
| 14 #include "content/public/common/socket_permission_request.h" | 14 #include "content/public/common/socket_permission_request.h" |
| 15 #include "extensions/common/api/messaging/message.h" | 15 #include "extensions/common/api/messaging/message.h" |
| 16 #include "extensions/common/draggable_region.h" | 16 #include "extensions/common/draggable_region.h" |
| 17 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
| 18 #include "extensions/common/extensions_client.h" | 18 #include "extensions/common/extensions_client.h" |
| 19 #include "extensions/common/host_id.h" |
| 19 #include "extensions/common/permissions/media_galleries_permission_data.h" | 20 #include "extensions/common/permissions/media_galleries_permission_data.h" |
| 20 #include "extensions/common/permissions/permission_set.h" | 21 #include "extensions/common/permissions/permission_set.h" |
| 21 #include "extensions/common/permissions/socket_permission_data.h" | 22 #include "extensions/common/permissions/socket_permission_data.h" |
| 22 #include "extensions/common/permissions/usb_device_permission_data.h" | 23 #include "extensions/common/permissions/usb_device_permission_data.h" |
| 23 #include "extensions/common/stack_frame.h" | 24 #include "extensions/common/stack_frame.h" |
| 24 #include "extensions/common/url_pattern.h" | 25 #include "extensions/common/url_pattern.h" |
| 25 #include "extensions/common/url_pattern_set.h" | 26 #include "extensions/common/url_pattern_set.h" |
| 26 #include "extensions/common/user_script.h" | 27 #include "extensions/common/user_script.h" |
| 27 #include "extensions/common/view_type.h" | 28 #include "extensions/common/view_type.h" |
| 28 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
| 29 #include "ui/gfx/ipc/gfx_param_traits.h" | 30 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 30 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 31 | 32 |
| 32 #define IPC_MESSAGE_START ExtensionMsgStart | 33 #define IPC_MESSAGE_START ExtensionMsgStart |
| 33 | 34 |
| 34 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) | 35 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) |
| 35 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, | 36 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, |
| 36 content::SocketPermissionRequest::OPERATION_TYPE_LAST) | 37 content::SocketPermissionRequest::OPERATION_TYPE_LAST) |
| 37 | 38 |
| 38 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, | 39 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, |
| 39 extensions::UserScript::INJECTION_TYPE_LAST) | 40 extensions::UserScript::INJECTION_TYPE_LAST) |
| 40 | 41 |
| 42 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) |
| 43 |
| 41 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and | 44 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and |
| 42 // ExtensionHostMsg_AddEventToActivityLog. | 45 // ExtensionHostMsg_AddEventToActivityLog. |
| 43 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) | 46 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) |
| 44 // API name. | 47 // API name. |
| 45 IPC_STRUCT_MEMBER(std::string, api_call) | 48 IPC_STRUCT_MEMBER(std::string, api_call) |
| 46 | 49 |
| 47 // List of arguments. | 50 // List of arguments. |
| 48 IPC_STRUCT_MEMBER(base::ListValue, arguments) | 51 IPC_STRUCT_MEMBER(base::ListValue, arguments) |
| 49 | 52 |
| 50 // Extra logging information. | 53 // Extra logging information. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 102 |
| 100 // True if request is executed in response to an explicit user gesture. | 103 // True if request is executed in response to an explicit user gesture. |
| 101 IPC_STRUCT_MEMBER(bool, user_gesture) | 104 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 102 IPC_STRUCT_END() | 105 IPC_STRUCT_END() |
| 103 | 106 |
| 104 // Allows an extension to execute code in a tab. | 107 // Allows an extension to execute code in a tab. |
| 105 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) | 108 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) |
| 106 // The extension API request id, for responding. | 109 // The extension API request id, for responding. |
| 107 IPC_STRUCT_MEMBER(int, request_id) | 110 IPC_STRUCT_MEMBER(int, request_id) |
| 108 | 111 |
| 109 // The ID of the requesting extension. To know which isolated world to | 112 // The type of the requesting injection host. |
| 113 IPC_STRUCT_MEMBER(HostID::HostType, host_type) |
| 114 |
| 115 // The ID of the requesting injection host. To know which isolated world to |
| 110 // execute the code inside of. | 116 // execute the code inside of. |
| 111 IPC_STRUCT_MEMBER(std::string, extension_id) | 117 IPC_STRUCT_MEMBER(std::string, host_id) |
| 112 | 118 |
| 113 // Whether the code is JavaScript or CSS. | 119 // Whether the code is JavaScript or CSS. |
| 114 IPC_STRUCT_MEMBER(bool, is_javascript) | 120 IPC_STRUCT_MEMBER(bool, is_javascript) |
| 115 | 121 |
| 116 // String of code to execute. | 122 // String of code to execute. |
| 117 IPC_STRUCT_MEMBER(std::string, code) | 123 IPC_STRUCT_MEMBER(std::string, code) |
| 118 | 124 |
| 119 // The webview guest source who calls to execute code. | 125 // The webview guest source who calls to execute code. |
| 120 IPC_STRUCT_MEMBER(GURL, webview_src) | 126 IPC_STRUCT_MEMBER(GURL, webview_src) |
| 121 | 127 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 int /* acc_obj_id */, | 786 int /* acc_obj_id */, |
| 781 base::string16 /* selector */) | 787 base::string16 /* selector */) |
| 782 | 788 |
| 783 // Result of a query selector request. | 789 // Result of a query selector request. |
| 784 // result_acc_obj_id is the accessibility tree ID of the result element; 0 | 790 // result_acc_obj_id is the accessibility tree ID of the result element; 0 |
| 785 // indicates no result. | 791 // indicates no result. |
| 786 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, | 792 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
| 787 int /* request_id */, | 793 int /* request_id */, |
| 788 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, | 794 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
| 789 int /* result_acc_obj_id */) | 795 int /* result_acc_obj_id */) |
| OLD | NEW |