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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 ExtensionMsg_PermissionSetStruct active_permissions; | 251 ExtensionMsg_PermissionSetStruct active_permissions; |
252 ExtensionMsg_PermissionSetStruct withheld_permissions; | 252 ExtensionMsg_PermissionSetStruct withheld_permissions; |
253 | 253 |
254 // We keep this separate so that it can be used in logging. | 254 // We keep this separate so that it can be used in logging. |
255 std::string id; | 255 std::string id; |
256 | 256 |
257 // Send creation flags so extension is initialized identically. | 257 // Send creation flags so extension is initialized identically. |
258 int creation_flags; | 258 int creation_flags; |
259 }; | 259 }; |
260 | 260 |
| 261 struct ExtensionHostMsg_AutomationQuerySelector_Error { |
| 262 enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed }; |
| 263 |
| 264 ExtensionHostMsg_AutomationQuerySelector_Error() : value(kNone) {} |
| 265 |
| 266 Value value; |
| 267 }; |
| 268 |
261 namespace IPC { | 269 namespace IPC { |
262 | 270 |
263 template <> | 271 template <> |
264 struct ParamTraits<URLPattern> { | 272 struct ParamTraits<URLPattern> { |
265 typedef URLPattern param_type; | 273 typedef URLPattern param_type; |
266 static void Write(Message* m, const param_type& p); | 274 static void Write(Message* m, const param_type& p); |
267 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 275 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
268 static void Log(const param_type& p, std::string* l); | 276 static void Log(const param_type& p, std::string* l); |
269 }; | 277 }; |
270 | 278 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 typedef ExtensionMsg_Loaded_Params param_type; | 321 typedef ExtensionMsg_Loaded_Params param_type; |
314 static void Write(Message* m, const param_type& p); | 322 static void Write(Message* m, const param_type& p); |
315 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 323 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
316 static void Log(const param_type& p, std::string* l); | 324 static void Log(const param_type& p, std::string* l); |
317 }; | 325 }; |
318 | 326 |
319 } // namespace IPC | 327 } // namespace IPC |
320 | 328 |
321 #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ | 329 #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ |
322 | 330 |
| 331 IPC_ENUM_TRAITS_MAX_VALUE( |
| 332 ExtensionHostMsg_AutomationQuerySelector_Error::Value, |
| 333 ExtensionHostMsg_AutomationQuerySelector_Error::kNodeDestroyed) |
| 334 |
| 335 IPC_STRUCT_TRAITS_BEGIN(ExtensionHostMsg_AutomationQuerySelector_Error) |
| 336 IPC_STRUCT_TRAITS_MEMBER(value) |
| 337 IPC_STRUCT_TRAITS_END() |
| 338 |
323 // Parameters structure for ExtensionMsg_UpdatePermissions. | 339 // Parameters structure for ExtensionMsg_UpdatePermissions. |
324 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) | 340 IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) |
325 IPC_STRUCT_MEMBER(std::string, extension_id) | 341 IPC_STRUCT_MEMBER(std::string, extension_id) |
326 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) | 342 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, active_permissions) |
327 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) | 343 IPC_STRUCT_MEMBER(ExtensionMsg_PermissionSetStruct, withheld_permissions) |
328 IPC_STRUCT_END() | 344 IPC_STRUCT_END() |
329 | 345 |
330 // Messages sent from the browser to the renderer. | 346 // Messages sent from the browser to the renderer. |
331 | 347 |
332 // The browser sends this message in response to all extension api calls. The | 348 // The browser sends this message in response to all extension api calls. The |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 int /* element_instance_id */, | 759 int /* element_instance_id */, |
744 int /* guest_instance_id */, | 760 int /* guest_instance_id */, |
745 base::DictionaryValue /* attach_params */) | 761 base::DictionaryValue /* attach_params */) |
746 | 762 |
747 // Tells the browser to create a mime handler guest view for a plugin. | 763 // Tells the browser to create a mime handler guest view for a plugin. |
748 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_CreateMimeHandlerViewGuest, | 764 IPC_MESSAGE_CONTROL4(ExtensionHostMsg_CreateMimeHandlerViewGuest, |
749 int /* render_frame_id */, | 765 int /* render_frame_id */, |
750 std::string /* embedder_url */, | 766 std::string /* embedder_url */, |
751 std::string /* mime_type */, | 767 std::string /* mime_type */, |
752 int /* element_instance_id */) | 768 int /* element_instance_id */) |
| 769 |
| 770 // Sent when a query selector request is made from the automation API. |
| 771 // acc_obj_id is the accessibility tree ID of the starting element. |
| 772 IPC_MESSAGE_ROUTED3(ExtensionMsg_AutomationQuerySelector, |
| 773 int /* request_id */, |
| 774 int /* acc_obj_id */, |
| 775 base::string16 /* selector */) |
| 776 |
| 777 // Result of a query selector request. |
| 778 // result_acc_obj_id is the accessibility tree ID of the result element; 0 |
| 779 // indicates no result. |
| 780 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
| 781 int /* request_id */, |
| 782 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
| 783 int /* result_acc_obj_id */) |
OLD | NEW |