| Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/21/17 11:48 AM | Hello, I am trying to send a msg from (browser) "src/net/url_request/url_request_http_job.cc" to (renderer) "src/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp". I am trying to use mojo message pipes for that. I am following https://www.chromium.org/developers/design-documents/mojo . I made a sample.mojom file and placed it under "components/metrics/leak_detector". How do I generate sample_imp.cc & sample_imp.h ? I added sample.mojom to the list of sources in mojom("interfaces") in leak_detector/BUILD.gn . Running "gn gen out/Default" and then compiling does not produce any sample_imp.h and simple_imp.cc . What do I need to add in BUILD.gn under "components/metrics/leak_detector" ? Thanks, Chandan |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/22/17 3:06 AM | Please post a link to your CL. Thanks, Colin
|
| Re: Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/22/17 4:32 AM | Hey, Please find the diff for BUILD.gn and leak_detector_monitor.mojom . leak_detector_monitor_imp.h & leak_detector_monitor_imp.cc are not getting created after running "gn gen out/Default" and compiling. Regards, Chandan |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/22/17 4:34 AM |
What is your compilation command? To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CAKYxKsyUgHBn5zvZSL%3D4vES%3DhtG6yfj7fwr6Sn%2B-VMUZYNDHKg%40mail.gmail.com. |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/22/17 4:35 AM |
and your platform? |
| Re: Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/22/17 4:39 AM | My compilation command is "ninja -C out/Default chrome" and my platform is macOS . |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/22/17 4:41 AM |
//components/metrics/leak_detector is ChromeOS-only (you can see that in the BUILD.gn file, where everything is wrapped in an if (is_chromeos)). |
| Re: Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/22/17 4:44 AM | Given my use case what do you suggest ? Where should I add my .mojom file and how to compile it ? You received this message because you are subscribed to a topic in the Google Groups "chromium-mojo" group. |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/22/17 6:51 AM |
//net/interfaces might be a good place to start. |
| Re: Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/22/17 7:09 AM | I will try that. Thanks Colin. |
| Re: Issues in generating bindings | Message pipe | Chandan Kharbanda | 3/23/17 3:46 AM | Hi Colin, I tried adding my mojom file to net/interfaces. Had some success as I was able to create `/out/Default/gen/net/interfaces/corp_data_sharing.mojom.cc` and other compiled files. Thanks :) I am struggling with binding and creating a class for implementation. I am following this : https://www.chromium.org/developers/design-documents/mojo. Where do I put my implementation file and how do I compile it (like in which BUILD.gn I need to add it) ? Here is my current diff : http://pastebin.com/A58iVp3N . Thanks, Chandan |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/23/17 5:37 AM |
I suggest that you study some existing examples in the codebase (just search around for .mojom files and go on from there to where they're referenced, implemented, where those implementation files are referenced, etc). To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CAKYxKsyBiuKNLgF5R4hdycp_9o7ojDxefcH7D7baffeFr1Xtmg%40mail.gmail.com. |
| Re: Issues in generating bindings | Message pipe | Akash Agrawall | 3/24/17 11:18 AM | cc'ing chromium-mojo group.
On Fri, Mar 24, 2017 at 11:45 PM Akash Agrawall <akash.ag...@gmail.com> wrote:
|
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/27/17 12:15 AM | Hi,
I think you're going to have do some exploring on your own as your use case seems pretty custom, apologies. |
| Re: Issues in generating bindings | Message pipe | Akash Agrawall | 3/27/17 9:50 PM | Hi, It will be great if you can point to an existing MoJo implementation. We would just need it to transfer "Raw Data (String)" from "src/net/url_request/url_request_http_job.cc" to "src/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp" Thanks and Regards, Akash Agrawall |
| Re: Issues in generating bindings | Message pipe | Colin Blundell | 3/28/17 12:26 AM | One thing you might want to do is start by augmenting an existing Mojo interface (e.g., adding a new method, implementing it to do some logging printouts, and calling it from some existing client of the interface). You can then incrementally expand out from there to try to realize your full ambitions.
|
| Re: Issues in generating bindings | Message pipe | Akash Agrawall | 3/28/17 1:55 AM | Got it. Will try that. Thanks :)
We made some progress on implementation of Mojo from scratch. Followed this documentation: https://goo.gl/A6rnaa Used GetProxy instead of MakeRequest now. I am not getting any syntactical errors now. However, I am getting this error: Codes: Kindly mention if you have an idea about the error. |
| Re: Issues in generating bindings | Message pipe | Akash Agrawall | 3/28/17 2:33 AM | Hi Shimazu,
Followed your documentation here: https://goo.gl/A6rnaa to implement Mojo but I am facing an error.
|