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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 ExtensionHostMsg_AutomationQuerySelector_Error() : value(kNone) {} | 294 ExtensionHostMsg_AutomationQuerySelector_Error() : value(kNone) {} |
295 | 295 |
296 Value value; | 296 Value value; |
297 }; | 297 }; |
298 | 298 |
299 namespace IPC { | 299 namespace IPC { |
300 | 300 |
301 template <> | 301 template <> |
302 struct ParamTraits<URLPattern> { | 302 struct ParamTraits<URLPattern> { |
303 typedef URLPattern param_type; | 303 typedef URLPattern param_type; |
304 static void Write(Message* m, const param_type& p); | 304 static void Write(base::Pickle* m, const param_type& p); |
305 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 305 static bool Read(const base::Pickle* m, |
| 306 base::PickleIterator* iter, |
| 307 param_type* p); |
306 static void Log(const param_type& p, std::string* l); | 308 static void Log(const param_type& p, std::string* l); |
307 }; | 309 }; |
308 | 310 |
309 template <> | 311 template <> |
310 struct ParamTraits<extensions::URLPatternSet> { | 312 struct ParamTraits<extensions::URLPatternSet> { |
311 typedef extensions::URLPatternSet param_type; | 313 typedef extensions::URLPatternSet param_type; |
312 static void Write(Message* m, const param_type& p); | 314 static void Write(base::Pickle* m, const param_type& p); |
313 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 315 static bool Read(const base::Pickle* m, |
| 316 base::PickleIterator* iter, |
| 317 param_type* p); |
314 static void Log(const param_type& p, std::string* l); | 318 static void Log(const param_type& p, std::string* l); |
315 }; | 319 }; |
316 | 320 |
317 template <> | 321 template <> |
318 struct ParamTraits<extensions::APIPermission::ID> { | 322 struct ParamTraits<extensions::APIPermission::ID> { |
319 typedef extensions::APIPermission::ID param_type; | 323 typedef extensions::APIPermission::ID param_type; |
320 static void Write(Message* m, const param_type& p); | 324 static void Write(base::Pickle* m, const param_type& p); |
321 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 325 static bool Read(const base::Pickle* m, |
| 326 base::PickleIterator* iter, |
| 327 param_type* p); |
322 static void Log(const param_type& p, std::string* l); | 328 static void Log(const param_type& p, std::string* l); |
323 }; | 329 }; |
324 | 330 |
325 template <> | 331 template <> |
326 struct ParamTraits<extensions::APIPermissionSet> { | 332 struct ParamTraits<extensions::APIPermissionSet> { |
327 typedef extensions::APIPermissionSet param_type; | 333 typedef extensions::APIPermissionSet param_type; |
328 static void Write(Message* m, const param_type& p); | 334 static void Write(base::Pickle* m, const param_type& p); |
329 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 335 static bool Read(const base::Pickle* m, |
| 336 base::PickleIterator* iter, |
| 337 param_type* r); |
330 static void Log(const param_type& p, std::string* l); | 338 static void Log(const param_type& p, std::string* l); |
331 }; | 339 }; |
332 | 340 |
333 template <> | 341 template <> |
334 struct ParamTraits<extensions::ManifestPermissionSet> { | 342 struct ParamTraits<extensions::ManifestPermissionSet> { |
335 typedef extensions::ManifestPermissionSet param_type; | 343 typedef extensions::ManifestPermissionSet param_type; |
336 static void Write(Message* m, const param_type& p); | 344 static void Write(base::Pickle* m, const param_type& p); |
337 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 345 static bool Read(const base::Pickle* m, |
| 346 base::PickleIterator* iter, |
| 347 param_type* r); |
338 static void Log(const param_type& p, std::string* l); | 348 static void Log(const param_type& p, std::string* l); |
339 }; | 349 }; |
340 | 350 |
341 template <> | 351 template <> |
342 struct ParamTraits<HostID> { | 352 struct ParamTraits<HostID> { |
343 typedef HostID param_type; | 353 typedef HostID param_type; |
344 static void Write(Message* m, const param_type& p); | 354 static void Write(base::Pickle* m, const param_type& p); |
345 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 355 static bool Read(const base::Pickle* m, |
| 356 base::PickleIterator* iter, |
| 357 param_type* r); |
346 static void Log(const param_type& p, std::string* l); | 358 static void Log(const param_type& p, std::string* l); |
347 }; | 359 }; |
348 | 360 |
349 template <> | 361 template <> |
350 struct ParamTraits<ExtensionMsg_PermissionSetStruct> { | 362 struct ParamTraits<ExtensionMsg_PermissionSetStruct> { |
351 typedef ExtensionMsg_PermissionSetStruct param_type; | 363 typedef ExtensionMsg_PermissionSetStruct param_type; |
352 static void Write(Message* m, const param_type& p); | 364 static void Write(base::Pickle* m, const param_type& p); |
353 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 365 static bool Read(const base::Pickle* m, |
| 366 base::PickleIterator* iter, |
| 367 param_type* p); |
354 static void Log(const param_type& p, std::string* l); | 368 static void Log(const param_type& p, std::string* l); |
355 }; | 369 }; |
356 | 370 |
357 template <> | 371 template <> |
358 struct ParamTraits<ExtensionMsg_Loaded_Params> { | 372 struct ParamTraits<ExtensionMsg_Loaded_Params> { |
359 typedef ExtensionMsg_Loaded_Params param_type; | 373 typedef ExtensionMsg_Loaded_Params param_type; |
360 static void Write(Message* m, const param_type& p); | 374 static void Write(base::Pickle* m, const param_type& p); |
361 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 375 static bool Read(const base::Pickle* m, |
| 376 base::PickleIterator* iter, |
| 377 param_type* p); |
362 static void Log(const param_type& p, std::string* l); | 378 static void Log(const param_type& p, std::string* l); |
363 }; | 379 }; |
364 | 380 |
365 } // namespace IPC | 381 } // namespace IPC |
366 | 382 |
367 #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ | 383 #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ |
368 | 384 |
369 IPC_ENUM_TRAITS_MAX_VALUE( | 385 IPC_ENUM_TRAITS_MAX_VALUE( |
370 ExtensionHostMsg_AutomationQuerySelector_Error::Value, | 386 ExtensionHostMsg_AutomationQuerySelector_Error::Value, |
371 ExtensionHostMsg_AutomationQuerySelector_Error::kNodeDestroyed) | 387 ExtensionHostMsg_AutomationQuerySelector_Error::kNodeDestroyed) |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 int /* acc_obj_id */, | 818 int /* acc_obj_id */, |
803 base::string16 /* selector */) | 819 base::string16 /* selector */) |
804 | 820 |
805 // Result of a query selector request. | 821 // Result of a query selector request. |
806 // result_acc_obj_id is the accessibility tree ID of the result element; 0 | 822 // result_acc_obj_id is the accessibility tree ID of the result element; 0 |
807 // indicates no result. | 823 // indicates no result. |
808 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, | 824 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
809 int /* request_id */, | 825 int /* request_id */, |
810 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, | 826 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
811 int /* result_acc_obj_id */) | 827 int /* result_acc_obj_id */) |
OLD | NEW |