| OLD | NEW |
| 1 # Converting Legacy Chrome IPC To Mojo | 1 # Converting Legacy Chrome IPC To Mojo |
| 2 | 2 |
| 3 Looking for [Mojo Documentation](/mojo)? | 3 Looking for [Mojo Documentation](/mojo)? |
| 4 | 4 |
| 5 [TOC] | 5 [TOC] |
| 6 | 6 |
| 7 ## Overview | 7 ## Overview |
| 8 | 8 |
| 9 The `//ipc` directory contains interfaces and implementation for Chrome's | 9 The `//ipc` directory contains interfaces and implementation for Chrome's |
| 10 legacy IPC system, including `IPC::Channel` and various macros for defining | 10 legacy IPC system, including `IPC::Channel` and various macros for defining |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 module content.mojom; | 597 module content.mojom; |
| 598 | 598 |
| 599 [Native] | 599 [Native] |
| 600 struct URLRequest; | 600 struct URLRequest; |
| 601 ``` | 601 ``` |
| 602 | 602 |
| 603 and add a typemap like [url_request.typemap](https://cs.chromium.org/chromium/sr
c/content/common/url_request.typemap) | 603 and add a typemap like [url_request.typemap](https://cs.chromium.org/chromium/sr
c/content/common/url_request.typemap) |
| 604 to define the mapping: | 604 to define the mapping: |
| 605 | 605 |
| 606 ``` | 606 ``` |
| 607 mojom = "//content/common/url_loader.mojom" | 607 mojom = "//content/public/common/url_loader.mojom" |
| 608 public_headers = [ "//content/common/resource_request.h" ] | 608 public_headers = [ "//content/common/resource_request.h" ] |
| 609 traits_headers = [ "//content/common/resource_messages.h" ] | 609 traits_headers = [ "//content/common/resource_messages.h" ] |
| 610 ... | 610 ... |
| 611 type_mappings = [ "content.mojom.URLRequest=content::ResourceRequest" ] | 611 type_mappings = [ "content.mojom.URLRequest=content::ResourceRequest" ] |
| 612 ``` | 612 ``` |
| 613 | 613 |
| 614 Note specifically that `public_headers` includes the definition of the native | 614 Note specifically that `public_headers` includes the definition of the native |
| 615 C++ type, and `traits_headers` includes the definition of the legacy IPC traits. | 615 C++ type, and `traits_headers` includes the definition of the legacy IPC traits. |
| 616 | 616 |
| 617 Finally, note that this same approach can be used to leverage existing | 617 Finally, note that this same approach can be used to leverage existing |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 [Chrome IPC to Mojo IPC Cheat Sheet](https://www.chromium.org/developers/design-
documents/mojo/chrome-ipc-to-mojo-ipc-cheat-sheet) | 659 [Chrome IPC to Mojo IPC Cheat Sheet](https://www.chromium.org/developers/design-
documents/mojo/chrome-ipc-to-mojo-ipc-cheat-sheet) |
| 660 : A slightly dated but still valuable document covering some details | 660 : A slightly dated but still valuable document covering some details |
| 661 regarding the conceptual mapping between legacy IPC and Mojo. | 661 regarding the conceptual mapping between legacy IPC and Mojo. |
| 662 | 662 |
| 663 [Mojo Migration Guide](https://www.chromium.org/developers/design-documents/mojo
/mojo-migration-guide) | 663 [Mojo Migration Guide](https://www.chromium.org/developers/design-documents/mojo
/mojo-migration-guide) |
| 664 : Another slightly (more) data document covering the basics of IPC conversion | 664 : Another slightly (more) data document covering the basics of IPC conversion |
| 665 to Mojo. | 665 to Mojo. |
| 666 | 666 |
| 667 TODO: The migration guide above should probably be deleted and the good | 667 TODO: The migration guide above should probably be deleted and the good |
| 668 parts merged into this document. | 668 parts merged into this document. |
| OLD | NEW |