| 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" | 15 #include "components/version_info/version_info.h" |
| 16 #include "content/public/common/common_param_traits.h" | 16 #include "content/public/common/common_param_traits.h" |
| 17 #include "content/public/common/socket_permission_request.h" | 17 #include "content/public/common/socket_permission_request.h" |
| 18 #include "extensions/common/api/messaging/message.h" | 18 #include "extensions/common/api/messaging/message.h" |
| 19 #include "extensions/common/api/messaging/port_id.h" | 19 #include "extensions/common/api/messaging/port_id.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/extension.h" | 22 #include "extensions/common/extension.h" |
| 22 #include "extensions/common/extensions_client.h" | 23 #include "extensions/common/extensions_client.h" |
| 23 #include "extensions/common/features/feature_session_type.h" | 24 #include "extensions/common/features/feature_session_type.h" |
| 24 #include "extensions/common/host_id.h" | 25 #include "extensions/common/host_id.h" |
| 25 #include "extensions/common/permissions/media_galleries_permission_data.h" | 26 #include "extensions/common/permissions/media_galleries_permission_data.h" |
| 26 #include "extensions/common/permissions/permission_set.h" | 27 #include "extensions/common/permissions/permission_set.h" |
| 27 #include "extensions/common/permissions/socket_permission_data.h" | 28 #include "extensions/common/permissions/socket_permission_data.h" |
| 28 #include "extensions/common/permissions/usb_device_permission_data.h" | 29 #include "extensions/common/permissions/usb_device_permission_data.h" |
| 29 #include "extensions/common/stack_frame.h" | 30 #include "extensions/common/stack_frame.h" |
| 30 #include "extensions/common/url_pattern.h" | 31 #include "extensions/common/url_pattern.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // The name of the event to dispatch. | 131 // The name of the event to dispatch. |
| 131 IPC_STRUCT_MEMBER(std::string, event_name) | 132 IPC_STRUCT_MEMBER(std::string, event_name) |
| 132 | 133 |
| 133 // The id of the event for use in the EventAck response message. | 134 // The id of the event for use in the EventAck response message. |
| 134 IPC_STRUCT_MEMBER(int, event_id) | 135 IPC_STRUCT_MEMBER(int, event_id) |
| 135 | 136 |
| 136 // Whether or not the event is part of a user gesture. | 137 // Whether or not the event is part of a user gesture. |
| 137 IPC_STRUCT_MEMBER(bool, is_user_gesture) | 138 IPC_STRUCT_MEMBER(bool, is_user_gesture) |
| 138 | 139 |
| 139 // Additional filtering info for the event. | 140 // Additional filtering info for the event. |
| 140 IPC_STRUCT_MEMBER(base::DictionaryValue, filtering_info) | 141 IPC_STRUCT_MEMBER(extensions::EventFilteringInfo, filtering_info) |
| 141 IPC_STRUCT_END() | 142 IPC_STRUCT_END() |
| 142 | 143 |
| 143 // Allows an extension to execute code in a tab. | 144 // Allows an extension to execute code in a tab. |
| 144 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) | 145 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) |
| 145 // The extension API request id, for responding. | 146 // The extension API request id, for responding. |
| 146 IPC_STRUCT_MEMBER(int, request_id) | 147 IPC_STRUCT_MEMBER(int, request_id) |
| 147 | 148 |
| 148 // The ID of the requesting injection host. | 149 // The ID of the requesting injection host. |
| 149 IPC_STRUCT_MEMBER(HostID, host_id) | 150 IPC_STRUCT_MEMBER(HostID, host_id) |
| 150 | 151 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 IPC_STRUCT_TRAITS_MEMBER(data) | 265 IPC_STRUCT_TRAITS_MEMBER(data) |
| 265 IPC_STRUCT_TRAITS_MEMBER(user_gesture) | 266 IPC_STRUCT_TRAITS_MEMBER(user_gesture) |
| 266 IPC_STRUCT_TRAITS_END() | 267 IPC_STRUCT_TRAITS_END() |
| 267 | 268 |
| 268 IPC_STRUCT_TRAITS_BEGIN(extensions::PortId) | 269 IPC_STRUCT_TRAITS_BEGIN(extensions::PortId) |
| 269 IPC_STRUCT_TRAITS_MEMBER(context_id) | 270 IPC_STRUCT_TRAITS_MEMBER(context_id) |
| 270 IPC_STRUCT_TRAITS_MEMBER(port_number) | 271 IPC_STRUCT_TRAITS_MEMBER(port_number) |
| 271 IPC_STRUCT_TRAITS_MEMBER(is_opener) | 272 IPC_STRUCT_TRAITS_MEMBER(is_opener) |
| 272 IPC_STRUCT_TRAITS_END() | 273 IPC_STRUCT_TRAITS_END() |
| 273 | 274 |
| 275 IPC_STRUCT_TRAITS_BEGIN(extensions::EventFilteringInfo) |
| 276 IPC_STRUCT_TRAITS_MEMBER(url) |
| 277 IPC_STRUCT_TRAITS_MEMBER(service_type) |
| 278 IPC_STRUCT_TRAITS_MEMBER(instance_id) |
| 279 IPC_STRUCT_TRAITS_MEMBER(window_type) |
| 280 IPC_STRUCT_TRAITS_MEMBER(window_exposed_by_default) |
| 281 IPC_STRUCT_TRAITS_END() |
| 282 |
| 274 // Singly-included section for custom IPC traits. | 283 // Singly-included section for custom IPC traits. |
| 275 #ifndef EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ | 284 #ifndef EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ |
| 276 #define EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ | 285 #define EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ |
| 277 | 286 |
| 278 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need | 287 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need |
| 279 // to typedef it to avoid that. | 288 // to typedef it to avoid that. |
| 280 // Substitution map for l10n messages. | 289 // Substitution map for l10n messages. |
| 281 typedef std::map<std::string, std::string> SubstitutionMap; | 290 typedef std::map<std::string, std::string> SubstitutionMap; |
| 282 | 291 |
| 283 // Map of extensions IDs to the executing script paths. | 292 // Map of extensions IDs to the executing script paths. |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 int64_t /* service_worker_version_id */, | 953 int64_t /* service_worker_version_id */, |
| 945 std::string /* request_uuid */) | 954 std::string /* request_uuid */) |
| 946 | 955 |
| 947 // Asks the browser to decrement the pending activity count for | 956 // Asks the browser to decrement the pending activity count for |
| 948 // the worker with version id |service_worker_version_id|. | 957 // the worker with version id |service_worker_version_id|. |
| 949 // |request_uuid| must match the GUID of a previous request, otherwise the | 958 // |request_uuid| must match the GUID of a previous request, otherwise the |
| 950 // browser process ignores the IPC. | 959 // browser process ignores the IPC. |
| 951 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, | 960 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
| 952 int64_t /* service_worker_version_id */, | 961 int64_t /* service_worker_version_id */, |
| 953 std::string /* request_uuid */) | 962 std::string /* request_uuid */) |
| OLD | NEW |