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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "components/version_info/version_info.h" | |
16 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
17 #include "content/public/common/socket_permission_request.h" | 16 #include "content/public/common/socket_permission_request.h" |
18 #include "extensions/common/api/messaging/message.h" | 17 #include "extensions/common/api/messaging/message.h" |
19 #include "extensions/common/api/messaging/port_id.h" | 18 #include "extensions/common/api/messaging/port_id.h" |
| 19 #include "extensions/common/common_param_traits.h" |
20 #include "extensions/common/draggable_region.h" | 20 #include "extensions/common/draggable_region.h" |
21 #include "extensions/common/event_filtering_info.h" | 21 #include "extensions/common/event_filtering_info.h" |
22 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
23 #include "extensions/common/extensions_client.h" | 23 #include "extensions/common/extensions_client.h" |
24 #include "extensions/common/features/feature_session_type.h" | |
25 #include "extensions/common/host_id.h" | 24 #include "extensions/common/host_id.h" |
26 #include "extensions/common/permissions/media_galleries_permission_data.h" | 25 #include "extensions/common/permissions/media_galleries_permission_data.h" |
27 #include "extensions/common/permissions/permission_set.h" | 26 #include "extensions/common/permissions/permission_set.h" |
28 #include "extensions/common/permissions/socket_permission_data.h" | 27 #include "extensions/common/permissions/socket_permission_data.h" |
29 #include "extensions/common/permissions/usb_device_permission_data.h" | 28 #include "extensions/common/permissions/usb_device_permission_data.h" |
30 #include "extensions/common/stack_frame.h" | 29 #include "extensions/common/stack_frame.h" |
31 #include "extensions/common/url_pattern.h" | 30 #include "extensions/common/url_pattern.h" |
32 #include "extensions/common/url_pattern_set.h" | 31 #include "extensions/common/url_pattern_set.h" |
33 #include "extensions/common/user_script.h" | 32 #include "extensions/common/user_script.h" |
34 #include "extensions/common/view_type.h" | 33 #include "extensions/common/view_type.h" |
35 #include "ipc/ipc_message_macros.h" | 34 #include "ipc/ipc_message_macros.h" |
36 #include "url/gurl.h" | 35 #include "url/gurl.h" |
37 | 36 |
38 #define IPC_MESSAGE_START ExtensionMsgStart | 37 #define IPC_MESSAGE_START ExtensionMsgStart |
39 | 38 |
40 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) | 39 IPC_ENUM_TRAITS_MAX_VALUE(extensions::ViewType, extensions::VIEW_TYPE_LAST) |
41 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, | 40 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, |
42 content::SocketPermissionRequest::OPERATION_TYPE_LAST) | 41 content::SocketPermissionRequest::OPERATION_TYPE_LAST) |
43 | 42 |
44 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, | 43 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, |
45 extensions::UserScript::INJECTION_TYPE_LAST) | 44 extensions::UserScript::INJECTION_TYPE_LAST) |
46 | 45 |
47 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation, | 46 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation, |
48 extensions::UserScript::RUN_LOCATION_LAST - 1) | 47 extensions::UserScript::RUN_LOCATION_LAST - 1) |
49 | 48 |
50 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) | 49 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) |
51 IPC_ENUM_TRAITS_MAX_VALUE(version_info::Channel, version_info::Channel::STABLE) | |
52 IPC_ENUM_TRAITS_MAX_VALUE(extensions::FeatureSessionType, | |
53 extensions::FeatureSessionType::LAST) | |
54 | 50 |
55 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and | 51 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and |
56 // ExtensionHostMsg_AddEventToActivityLog. | 52 // ExtensionHostMsg_AddEventToActivityLog. |
57 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) | 53 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) |
58 // API name. | 54 // API name. |
59 IPC_STRUCT_MEMBER(std::string, api_call) | 55 IPC_STRUCT_MEMBER(std::string, api_call) |
60 | 56 |
61 // List of arguments. | 57 // List of arguments. |
62 IPC_STRUCT_MEMBER(base::ListValue, arguments) | 58 IPC_STRUCT_MEMBER(base::ListValue, arguments) |
63 | 59 |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 int64_t /* service_worker_version_id */, | 949 int64_t /* service_worker_version_id */, |
954 std::string /* request_uuid */) | 950 std::string /* request_uuid */) |
955 | 951 |
956 // Asks the browser to decrement the pending activity count for | 952 // Asks the browser to decrement the pending activity count for |
957 // the worker with version id |service_worker_version_id|. | 953 // the worker with version id |service_worker_version_id|. |
958 // |request_uuid| must match the GUID of a previous request, otherwise the | 954 // |request_uuid| must match the GUID of a previous request, otherwise the |
959 // browser process ignores the IPC. | 955 // browser process ignores the IPC. |
960 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, | 956 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
961 int64_t /* service_worker_version_id */, | 957 int64_t /* service_worker_version_id */, |
962 std::string /* request_uuid */) | 958 std::string /* request_uuid */) |
OLD | NEW |