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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 // The browser sends this message in response to all extension api calls. The | 284 // The browser sends this message in response to all extension api calls. The |
285 // response data (if any) is one of the base::Value subclasses, wrapped as the | 285 // response data (if any) is one of the base::Value subclasses, wrapped as the |
286 // first element in a ListValue. | 286 // first element in a ListValue. |
287 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, | 287 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, |
288 int /* request_id */, | 288 int /* request_id */, |
289 bool /* success */, | 289 bool /* success */, |
290 ListValue /* response wrapper (see comment above) */, | 290 ListValue /* response wrapper (see comment above) */, |
291 std::string /* error */) | 291 std::string /* error */) |
292 | 292 |
293 // This message is optionally routed. If used as a control message, it | 293 // This message is optionally routed. If used as a control message, it will |
294 // will call a javascript function in every registered context in the | 294 // call a javascript function |function_name| from module |module_name| in |
295 // target process. If routed, it will be restricted to the contexts that | 295 // every registered context in the target process. If routed, it will be |
296 // are part of the target RenderView. | 296 // restricted to the contexts that are part of the target RenderView. |
| 297 // |
297 // If |extension_id| is non-empty, the function will be invoked only in | 298 // If |extension_id| is non-empty, the function will be invoked only in |
298 // contexts owned by the extension. |args| is a list of primitive Value types | 299 // contexts owned by the extension. |args| is a list of primitive Value types |
299 // that are passed to the function. | 300 // that are passed to the function. |
300 IPC_MESSAGE_ROUTED4(ExtensionMsg_MessageInvoke, | 301 IPC_MESSAGE_ROUTED5(ExtensionMsg_MessageInvoke, |
301 std::string /* extension_id */, | 302 std::string /* extension_id */, |
| 303 std::string /* module_name */, |
302 std::string /* function_name */, | 304 std::string /* function_name */, |
303 ListValue /* args */, | 305 ListValue /* args */, |
304 bool /* delivered as part of a user gesture */) | 306 bool /* delivered as part of a user gesture */) |
305 | 307 |
306 // Tell the renderer process all known extension function names. | 308 // Tell the renderer process all known extension function names. |
307 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetFunctionNames, | 309 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetFunctionNames, |
308 std::vector<std::string>) | 310 std::vector<std::string>) |
309 | 311 |
310 // Marks an extension as 'active' in an extension process. 'Active' extensions | 312 // Marks an extension as 'active' in an extension process. 'Active' extensions |
311 // have more privileges than other extension content that might end up running | 313 // have more privileges than other extension content that might end up running |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse, | 404 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse, |
403 int32 /* install id */, | 405 int32 /* install id */, |
404 bool /* whether the install was successful */, | 406 bool /* whether the install was successful */, |
405 std::string /* error */) | 407 std::string /* error */) |
406 | 408 |
407 // Response to the renderer for ExtensionHostMsg_GetAppInstallState. | 409 // Response to the renderer for ExtensionHostMsg_GetAppInstallState. |
408 IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse, | 410 IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse, |
409 std::string /* state */, | 411 std::string /* state */, |
410 int32 /* callback_id */) | 412 int32 /* callback_id */) |
411 | 413 |
412 // Dispatch the Port.onConnect event for message channels. | 414 // Dispatch the onConnect event for message channels. |
413 IPC_MESSAGE_ROUTED4(ExtensionMsg_DispatchOnConnect, | 415 IPC_MESSAGE_ROUTED4(ExtensionMsg_DispatchOnConnect, |
414 int /* target_port_id */, | 416 int /* target_port_id */, |
415 std::string /* channel_name */, | 417 std::string /* channel_name */, |
416 DictionaryValue /* source_tab */, | 418 DictionaryValue /* source_tab */, |
417 ExtensionMsg_ExternalConnectionInfo) | 419 ExtensionMsg_ExternalConnectionInfo) |
418 | 420 |
419 // Deliver a message sent with ExtensionHostMsg_PostMessage. | 421 // Deliver a message sent with ExtensionHostMsg_PostMessage. |
420 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, | 422 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, |
421 int /* target_port_id */, | 423 int /* target_port_id */, |
422 std::string /* message */) | 424 ListValue /* message arguments, a 0-or-1 length list */) |
423 | 425 |
424 // Dispatch the Port.onDisconnect event for message channels. | 426 // Dispatch the onDisconnect event for message channels. |
425 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, | 427 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, |
426 int /* port_id */, | 428 int /* port_id */, |
427 std::string /* error_message */) | 429 std::string /* error_message */) |
428 | 430 |
429 // Informs the renderer what channel (dev, beta, stable, etc) is running. | 431 // Informs the renderer what channel (dev, beta, stable, etc) is running. |
430 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, | 432 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, |
431 int /* channel */) | 433 int /* channel */) |
432 | 434 |
433 // Adds a logging message to the renderer's root frame DevTools console. | 435 // Adds a logging message to the renderer's root frame DevTools console. |
434 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole, | 436 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 int /* routing_id */, | 524 int /* routing_id */, |
523 int /* tab_id */, | 525 int /* tab_id */, |
524 std::string /* extension_id */, | 526 std::string /* extension_id */, |
525 std::string /* channel_name */, | 527 std::string /* channel_name */, |
526 int /* port_id */) | 528 int /* port_id */) |
527 | 529 |
528 // Send a message to an extension process. The handle is the value returned | 530 // Send a message to an extension process. The handle is the value returned |
529 // by ViewHostMsg_OpenChannelTo*. | 531 // by ViewHostMsg_OpenChannelTo*. |
530 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage, | 532 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage, |
531 int /* port_id */, | 533 int /* port_id */, |
532 std::string /* message */) | 534 ListValue /* message arguments, a 0-or-1 length list */) |
533 | 535 |
534 // Send a message to an extension process. The handle is the value returned | 536 // Send a message to an extension process. The handle is the value returned |
535 // by ViewHostMsg_OpenChannelTo*. | 537 // by ViewHostMsg_OpenChannelTo*. |
536 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel, | 538 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel, |
537 int /* port_id */, | 539 int /* port_id */, |
538 std::string /* error_message */) | 540 std::string /* error_message */) |
539 | 541 |
540 // Used to get the extension message bundle. | 542 // Used to get the extension message bundle. |
541 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle, | 543 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle, |
542 std::string /* extension id */, | 544 std::string /* extension id */, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 // Notifies the browser process that a tab has started or stopped matching | 637 // Notifies the browser process that a tab has started or stopped matching |
636 // certain conditions. This message is sent in response to several events: | 638 // certain conditions. This message is sent in response to several events: |
637 // | 639 // |
638 // * ExtensionMsg_WatchPages was received, updating the set of conditions. | 640 // * ExtensionMsg_WatchPages was received, updating the set of conditions. |
639 // * A new page is loaded. This will be sent after ViewHostMsg_FrameNavigate. | 641 // * A new page is loaded. This will be sent after ViewHostMsg_FrameNavigate. |
640 // Currently this only fires for the main frame. | 642 // Currently this only fires for the main frame. |
641 // * Something changed on an existing frame causing the set of matching searches | 643 // * Something changed on an existing frame causing the set of matching searches |
642 // to change. | 644 // to change. |
643 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, | 645 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, |
644 std::vector<std::string> /* Matching CSS selectors */) | 646 std::vector<std::string> /* Matching CSS selectors */) |
OLD | NEW |