| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 11 #include "chrome/common/extensions/extension_permission_set.h" | 11 #include "chrome/common/extensions/extension_permission_set.h" |
| 12 #include "chrome/common/extensions/url_pattern.h" | 12 #include "chrome/common/extensions/url_pattern.h" |
| 13 #include "chrome/common/extensions/url_pattern_set.h" | 13 #include "chrome/common/extensions/url_pattern_set.h" |
| 14 #include "chrome/common/web_apps.h" | 14 #include "chrome/common/web_apps.h" |
| 15 #include "content/public/common/view_types.h" | 15 #include "content/public/common/view_types.h" |
| 16 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
| 17 | 17 |
| 18 #define IPC_MESSAGE_START ExtensionMsgStart | 18 #define IPC_MESSAGE_START ExtensionMsgStart |
| 19 | 19 |
| 20 // Parameters structure for ExtensionHostMsg_Request. | 20 // Parameters structure for ExtensionHostMsg_Request. |
| 21 IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params) | 21 IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params) |
| 22 // Message name. | 22 // Message name. |
| 23 IPC_STRUCT_MEMBER(std::string, name) | 23 IPC_STRUCT_MEMBER(std::string, name) |
| 24 | 24 |
| 25 // List of message arguments. | 25 // List of message arguments. |
| 26 IPC_STRUCT_MEMBER(ListValue, arguments) | 26 IPC_STRUCT_MEMBER(ListValue, arguments) |
| 27 | 27 |
| 28 // URL of the frame request was sent from. | 28 // Extension ID this request was sent from. This can be empty, in the case |
| 29 // where we expose APIs to normal web pages using the extension function |
| 30 // system. |
| 31 IPC_STRUCT_MEMBER(std::string, extension_id) |
| 32 |
| 33 // URL of the frame the request was sent from. This isn't necessarily an |
| 34 // extension url. Extension requests can also originate from content scripts, |
| 35 // in which case extension_id will indicate the ID of the associated |
| 36 // extension. Or, they can origiante from hosted apps or normal web pages. |
| 29 IPC_STRUCT_MEMBER(GURL, source_url) | 37 IPC_STRUCT_MEMBER(GURL, source_url) |
| 30 | 38 |
| 31 // Unique request id to match requests and responses. | 39 // Unique request id to match requests and responses. |
| 32 IPC_STRUCT_MEMBER(int, request_id) | 40 IPC_STRUCT_MEMBER(int, request_id) |
| 33 | 41 |
| 34 // True if request has a callback specified. | 42 // True if request has a callback specified. |
| 35 IPC_STRUCT_MEMBER(bool, has_callback) | 43 IPC_STRUCT_MEMBER(bool, has_callback) |
| 36 | 44 |
| 37 // True if request is executed in response to an explicit user gesture. | 45 // True if request is executed in response to an explicit user gesture. |
| 38 IPC_STRUCT_MEMBER(bool, user_gesture) | 46 IPC_STRUCT_MEMBER(bool, user_gesture) |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // Response to the renderer for the above message. | 359 // Response to the renderer for the above message. |
| 352 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, | 360 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, |
| 353 std::string /* channel_id */, | 361 std::string /* channel_id */, |
| 354 std::string /* error */, | 362 std::string /* error */, |
| 355 int32 /* callback_id */) | 363 int32 /* callback_id */) |
| 356 | 364 |
| 357 // Deliver a message sent with ExtensionHostMsg_PostMessage. | 365 // Deliver a message sent with ExtensionHostMsg_PostMessage. |
| 358 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, | 366 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, |
| 359 int /* target_port_id */, | 367 int /* target_port_id */, |
| 360 std::string /* message */) | 368 std::string /* message */) |
| OLD | NEW |