| 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 "content/public/common/common_param_traits.h" | 16 #include "content/public/common/common_param_traits.h" |
| 16 #include "content/public/common/socket_permission_request.h" | 17 #include "content/public/common/socket_permission_request.h" |
| 17 #include "extensions/common/api/messaging/message.h" | 18 #include "extensions/common/api/messaging/message.h" |
| 18 #include "extensions/common/draggable_region.h" | 19 #include "extensions/common/draggable_region.h" |
| 19 #include "extensions/common/extension.h" | 20 #include "extensions/common/extension.h" |
| 20 #include "extensions/common/extensions_client.h" | 21 #include "extensions/common/extensions_client.h" |
| 21 #include "extensions/common/host_id.h" | 22 #include "extensions/common/host_id.h" |
| 22 #include "extensions/common/permissions/media_galleries_permission_data.h" | 23 #include "extensions/common/permissions/media_galleries_permission_data.h" |
| 23 #include "extensions/common/permissions/permission_set.h" | 24 #include "extensions/common/permissions/permission_set.h" |
| 24 #include "extensions/common/permissions/socket_permission_data.h" | 25 #include "extensions/common/permissions/socket_permission_data.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 37 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, | 38 IPC_ENUM_TRAITS_MAX_VALUE(content::SocketPermissionRequest::OperationType, |
| 38 content::SocketPermissionRequest::OPERATION_TYPE_LAST) | 39 content::SocketPermissionRequest::OPERATION_TYPE_LAST) |
| 39 | 40 |
| 40 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, | 41 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::InjectionType, |
| 41 extensions::UserScript::INJECTION_TYPE_LAST) | 42 extensions::UserScript::INJECTION_TYPE_LAST) |
| 42 | 43 |
| 43 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation, | 44 IPC_ENUM_TRAITS_MAX_VALUE(extensions::UserScript::RunLocation, |
| 44 extensions::UserScript::RUN_LOCATION_LAST - 1) | 45 extensions::UserScript::RUN_LOCATION_LAST - 1) |
| 45 | 46 |
| 46 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) | 47 IPC_ENUM_TRAITS_MAX_VALUE(HostID::HostType, HostID::HOST_TYPE_LAST) |
| 48 IPC_ENUM_TRAITS_MAX_VALUE(version_info::Channel, version_info::Channel::STABLE) |
| 47 | 49 |
| 48 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and | 50 // Parameters structure for ExtensionHostMsg_AddAPIActionToActivityLog and |
| 49 // ExtensionHostMsg_AddEventToActivityLog. | 51 // ExtensionHostMsg_AddEventToActivityLog. |
| 50 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) | 52 IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params) |
| 51 // API name. | 53 // API name. |
| 52 IPC_STRUCT_MEMBER(std::string, api_call) | 54 IPC_STRUCT_MEMBER(std::string, api_call) |
| 53 | 55 |
| 54 // List of arguments. | 56 // List of arguments. |
| 55 IPC_STRUCT_MEMBER(base::ListValue, arguments) | 57 IPC_STRUCT_MEMBER(base::ListValue, arguments) |
| 56 | 58 |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 int /* source_tab_id */, | 585 int /* source_tab_id */, |
| 584 extensions::Message) | 586 extensions::Message) |
| 585 | 587 |
| 586 // Dispatch the Port.onDisconnect event for message channels. | 588 // Dispatch the Port.onDisconnect event for message channels. |
| 587 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, | 589 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, |
| 588 int /* port_id */, | 590 int /* port_id */, |
| 589 std::string /* error_message */) | 591 std::string /* error_message */) |
| 590 | 592 |
| 591 // Informs the renderer what channel (dev, beta, stable, etc) is running. | 593 // Informs the renderer what channel (dev, beta, stable, etc) is running. |
| 592 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, | 594 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, |
| 593 int /* channel */) | 595 version_info::Channel /* channel */) |
| 594 | 596 |
| 595 // Notify the renderer that its window has closed. | 597 // Notify the renderer that its window has closed. |
| 596 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed) | 598 IPC_MESSAGE_ROUTED0(ExtensionMsg_AppWindowClosed) |
| 597 | 599 |
| 598 // Notify the renderer that an extension wants notifications when certain | 600 // Notify the renderer that an extension wants notifications when certain |
| 599 // searches match the active page. This message replaces the old set of | 601 // searches match the active page. This message replaces the old set of |
| 600 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from | 602 // searches, and triggers ExtensionHostMsg_OnWatchedPageChange messages from |
| 601 // each tab to keep the browser updated about changes. | 603 // each tab to keep the browser updated about changes. |
| 602 IPC_MESSAGE_CONTROL1(ExtensionMsg_WatchPages, | 604 IPC_MESSAGE_CONTROL1(ExtensionMsg_WatchPages, |
| 603 std::vector<std::string> /* CSS selectors */) | 605 std::vector<std::string> /* CSS selectors */) |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 870 |
| 869 // The browser sends this message in response to all service worker extension | 871 // The browser sends this message in response to all service worker extension |
| 870 // api calls. The response data (if any) is one of the base::Value subclasses, | 872 // api calls. The response data (if any) is one of the base::Value subclasses, |
| 871 // wrapped as the first element in a ListValue. | 873 // wrapped as the first element in a ListValue. |
| 872 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, | 874 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, |
| 873 int /* thread_id */, | 875 int /* thread_id */, |
| 874 int /* request_id */, | 876 int /* request_id */, |
| 875 bool /* success */, | 877 bool /* success */, |
| 876 base::ListValue /* response wrapper (see comment above) */, | 878 base::ListValue /* response wrapper (see comment above) */, |
| 877 std::string /* error */) | 879 std::string /* error */) |
| OLD | NEW |