Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: extensions/common/extension_messages.h

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 IPC_STRUCT_MEMBER(int, source_tab_id) 99 IPC_STRUCT_MEMBER(int, source_tab_id)
100 100
101 // Unique request id to match requests and responses. 101 // Unique request id to match requests and responses.
102 IPC_STRUCT_MEMBER(int, request_id) 102 IPC_STRUCT_MEMBER(int, request_id)
103 103
104 // True if request has a callback specified. 104 // True if request has a callback specified.
105 IPC_STRUCT_MEMBER(bool, has_callback) 105 IPC_STRUCT_MEMBER(bool, has_callback)
106 106
107 // True if request is executed in response to an explicit user gesture. 107 // True if request is executed in response to an explicit user gesture.
108 IPC_STRUCT_MEMBER(bool, user_gesture) 108 IPC_STRUCT_MEMBER(bool, user_gesture)
109
110 // If this API call is for a service worker, then this is the worker thread
111 // id.
Devlin 2016/04/13 19:46:31 Otherwise, this is...?
lazyboy 2016/04/14 02:07:53 Done.
112 IPC_STRUCT_MEMBER(int, worker_thread_id)
113
114 // If this API call is for a service worker, then this is the embedded
115 // worker id.
Devlin 2016/04/13 19:46:31 ditto
lazyboy 2016/04/14 02:07:53 Done.
116 IPC_STRUCT_MEMBER(int, embedded_worker_id)
109 IPC_STRUCT_END() 117 IPC_STRUCT_END()
110 118
111 // Allows an extension to execute code in a tab. 119 // Allows an extension to execute code in a tab.
112 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) 120 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
113 // The extension API request id, for responding. 121 // The extension API request id, for responding.
114 IPC_STRUCT_MEMBER(int, request_id) 122 IPC_STRUCT_MEMBER(int, request_id)
115 123
116 // The ID of the requesting injection host. 124 // The ID of the requesting injection host.
117 IPC_STRUCT_MEMBER(HostID, host_id) 125 IPC_STRUCT_MEMBER(HostID, host_id)
118 126
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 int /* acc_obj_id */, 832 int /* acc_obj_id */,
825 base::string16 /* selector */) 833 base::string16 /* selector */)
826 834
827 // Result of a query selector request. 835 // Result of a query selector request.
828 // result_acc_obj_id is the accessibility tree ID of the result element; 0 836 // result_acc_obj_id is the accessibility tree ID of the result element; 0
829 // indicates no result. 837 // indicates no result.
830 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, 838 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result,
831 int /* request_id */, 839 int /* request_id */,
832 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, 840 ExtensionHostMsg_AutomationQuerySelector_Error /* error */,
833 int /* result_acc_obj_id */) 841 int /* result_acc_obj_id */)
842
843 // Messages related to Extension Service Worker.
844 #undef IPC_MESSAGE_START
845 #define IPC_MESSAGE_START ExtensionWorkerMsgStart
846 // A service worker thread sends this message when an extension service worker
847 // starts an API request. The browser will always respond with a
848 // ExtensionMsg_ResponseWorker.
849 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_RequestWorker,
850 ExtensionHostMsg_Request_Params)
851
852 // The browser sends this message in response to all service worker extension
853 // api calls. The response data (if any) is one of the base::Value subclasses,
854 // wrapped as the first element in a ListValue.
855 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker,
856 int /* thread_id */,
857 int /* request_id */,
858 bool /* success */,
859 base::ListValue /* response wrapper (see comment above) */,
860 std::string /* error */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698