OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 std::string /* response */, | 169 std::string /* response */, |
170 std::string /* error */) | 170 std::string /* error */) |
171 | 171 |
172 // This message is optionally routed. If used as a control message, it | 172 // This message is optionally routed. If used as a control message, it |
173 // will call a javascript function in every registered context in the | 173 // will call a javascript function in every registered context in the |
174 // target process. If routed, it will be restricted to the contexts that | 174 // target process. If routed, it will be restricted to the contexts that |
175 // are part of the target RenderView. | 175 // are part of the target RenderView. |
176 // If |extension_id| is non-empty, the function will be invoked only in | 176 // If |extension_id| is non-empty, the function will be invoked only in |
177 // contexts owned by the extension. |args| is a list of primitive Value types | 177 // contexts owned by the extension. |args| is a list of primitive Value types |
178 // that are passed to the function. | 178 // that are passed to the function. |
179 IPC_MESSAGE_ROUTED4(ExtensionMsg_MessageInvoke, | 179 IPC_MESSAGE_ROUTED5(ExtensionMsg_MessageInvoke, |
180 std::string /* extension_id */, | 180 std::string /* extension_id */, |
181 std::string /* function_name */, | 181 std::string /* function_name */, |
182 ListValue /* args */, | 182 ListValue /* args */, |
183 GURL /* event URL */) | 183 GURL /* event URL */, |
| 184 bool /* delivered as part of a user gesture */) |
184 | 185 |
185 // Tell the renderer process all known extension function names. | 186 // Tell the renderer process all known extension function names. |
186 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetFunctionNames, | 187 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetFunctionNames, |
187 std::vector<std::string>) | 188 std::vector<std::string>) |
188 | 189 |
189 // Marks an extension as 'active' in an extension process. 'Active' extensions | 190 // Marks an extension as 'active' in an extension process. 'Active' extensions |
190 // have more privileges than other extension content that might end up running | 191 // have more privileges than other extension content that might end up running |
191 // in the process (e.g. because of iframes or content scripts). | 192 // in the process (e.g. because of iframes or content scripts). |
192 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension, | 193 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension, |
193 std::string /* extension_id */) | 194 std::string /* extension_id */) |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 // Response to the renderer for the above message. | 379 // Response to the renderer for the above message. |
379 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, | 380 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, |
380 std::string /* channel_id */, | 381 std::string /* channel_id */, |
381 std::string /* error */, | 382 std::string /* error */, |
382 int32 /* callback_id */) | 383 int32 /* callback_id */) |
383 | 384 |
384 // Deliver a message sent with ExtensionHostMsg_PostMessage. | 385 // Deliver a message sent with ExtensionHostMsg_PostMessage. |
385 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, | 386 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, |
386 int /* target_port_id */, | 387 int /* target_port_id */, |
387 std::string /* message */) | 388 std::string /* message */) |
OLD | NEW |