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> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // If this API call is for a service worker, then this is the worker thread | 113 // If this API call is for a service worker, then this is the worker thread |
114 // id. Otherwise, this is -1. | 114 // id. Otherwise, this is -1. |
115 IPC_STRUCT_MEMBER(int, worker_thread_id) | 115 IPC_STRUCT_MEMBER(int, worker_thread_id) |
116 | 116 |
117 // If this API call is for a service worker, then this is the service | 117 // If this API call is for a service worker, then this is the service |
118 // worker version id. Otherwise, this is -1. | 118 // worker version id. Otherwise, this is -1. |
119 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id) | 119 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id) |
120 IPC_STRUCT_END() | 120 IPC_STRUCT_END() |
121 | 121 |
122 IPC_STRUCT_BEGIN(ExtensionMsg_DispatchEvent_Params) | 122 IPC_STRUCT_BEGIN(ExtensionMsg_DispatchEvent_Params) |
| 123 // If this event is for a service worker, then this is the worker thread |
| 124 // id. Otherwise, this is 0. |
| 125 IPC_STRUCT_MEMBER(int, worker_thread_id) |
| 126 |
123 // The id of the extension to dispatch the event to. | 127 // The id of the extension to dispatch the event to. |
124 IPC_STRUCT_MEMBER(std::string, extension_id) | 128 IPC_STRUCT_MEMBER(std::string, extension_id) |
125 | 129 |
126 // The name of the event to dispatch. | 130 // The name of the event to dispatch. |
127 IPC_STRUCT_MEMBER(std::string, event_name) | 131 IPC_STRUCT_MEMBER(std::string, event_name) |
128 | 132 |
129 // The id of the event for use in the EventAck response message. | 133 // The id of the event for use in the EventAck response message. |
130 IPC_STRUCT_MEMBER(int, event_id) | 134 IPC_STRUCT_MEMBER(int, event_id) |
131 | 135 |
132 // Whether or not the event is part of a user gesture. | 136 // Whether or not the event is part of a user gesture. |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, | 676 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, |
673 ExtensionHostMsg_Request_Params) | 677 ExtensionHostMsg_Request_Params) |
674 | 678 |
675 // A renderer sends this message when an extension process starts an API | 679 // A renderer sends this message when an extension process starts an API |
676 // request. The browser will always respond with a ExtensionMsg_Response. | 680 // request. The browser will always respond with a ExtensionMsg_Response. |
677 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, | 681 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, |
678 int /* routing_id */, | 682 int /* routing_id */, |
679 ExtensionHostMsg_Request_Params) | 683 ExtensionHostMsg_Request_Params) |
680 | 684 |
681 // Notify the browser that the given extension added a listener to an event. | 685 // Notify the browser that the given extension added a listener to an event. |
682 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_AddListener, | 686 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddListener, |
683 std::string /* extension_id */, | 687 std::string /* extension_id */, |
684 GURL /* listener_url */, | 688 GURL /* listener_url */, |
685 std::string /* name */) | 689 std::string /* name */, |
| 690 int /* worker_thread_id */) |
686 | 691 |
687 // Notify the browser that the given extension removed a listener from an | 692 // Notify the browser that the given extension removed a listener from an |
688 // event. | 693 // event. |
689 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_RemoveListener, | 694 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_RemoveListener, |
690 std::string /* extension_id */, | 695 std::string /* extension_id */, |
691 GURL /* listener_url */, | 696 GURL /* listener_url */, |
692 std::string /* name */) | 697 std::string /* name */, |
| 698 int /* worker_thread_id */) |
693 | 699 |
694 // Notify the browser that the given extension added a listener to an event from | 700 // Notify the browser that the given extension added a listener to an event from |
695 // a lazy background page. | 701 // a lazy background page. |
696 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_AddLazyListener, | 702 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_AddLazyListener, |
697 std::string /* extension_id */, | 703 std::string /* extension_id */, |
698 std::string /* name */) | 704 std::string /* name */, |
| 705 int /* worker_thread_id */) |
699 | 706 |
700 // Notify the browser that the given extension is no longer interested in | 707 // Notify the browser that the given extension is no longer interested in |
701 // receiving the given event from a lazy background page. | 708 // receiving the given event from a lazy background page. |
702 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveLazyListener, | 709 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_RemoveLazyListener, |
703 std::string /* extension_id */, | 710 std::string /* extension_id */, |
704 std::string /* name */) | 711 std::string /* name */, |
| 712 int /* worker_thread_id */) |
705 | 713 |
706 // Notify the browser that the given extension added a listener to instances of | 714 // Notify the browser that the given extension added a listener to instances of |
707 // the named event that satisfy the filter. | 715 // the named event that satisfy the filter. |
708 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddFilteredListener, | 716 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddFilteredListener, |
709 std::string /* extension_id */, | 717 std::string /* extension_id */, |
710 std::string /* name */, | 718 std::string /* name */, |
711 base::DictionaryValue /* filter */, | 719 base::DictionaryValue /* filter */, |
712 bool /* lazy */) | 720 bool /* lazy */) |
713 | 721 |
714 // Notify the browser that the given extension is no longer interested in | 722 // Notify the browser that the given extension is no longer interested in |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 int64_t /* service_worker_version_id */, | 943 int64_t /* service_worker_version_id */, |
936 std::string /* request_uuid */) | 944 std::string /* request_uuid */) |
937 | 945 |
938 // Asks the browser to decrement the pending activity count for | 946 // Asks the browser to decrement the pending activity count for |
939 // the worker with version id |service_worker_version_id|. | 947 // the worker with version id |service_worker_version_id|. |
940 // |request_uuid| must match the GUID of a previous request, otherwise the | 948 // |request_uuid| must match the GUID of a previous request, otherwise the |
941 // browser process ignores the IPC. | 949 // browser process ignores the IPC. |
942 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, | 950 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
943 int64_t /* service_worker_version_id */, | 951 int64_t /* service_worker_version_id */, |
944 std::string /* request_uuid */) | 952 std::string /* request_uuid */) |
OLD | NEW |