Issues in generating bindings | Message pipe

Showing 1-18 of 18 messages
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
 

Thanks,
Chandan

--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromi...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/7c50b778-4f9e-4c50-9762-e93aad0c62b7%40chromium.org.
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


On Wed, Mar 22, 2017 at 12:32 PM Chandan Kharbanda <chandan....@gmail.com> wrote:
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.


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


On Wed, Mar 22, 2017 at 12:33 PM Colin Blundell <blun...@chromium.org> wrote:
On Wed, Mar 22, 2017 at 12:32 PM Chandan Kharbanda <chandan....@gmail.com> wrote:
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.


What is your compilation command?

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


On Wed, Mar 22, 2017 at 12:39 PM Chandan Kharbanda <chandan....@gmail.com> wrote:
My compilation command is "ninja -C out/Default chrome" and my platform is macOS .

//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.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-mojo/a7htY8Si-rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromi...@chromium.org.

To post to this group, send email to chromi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CAMGE5NH%3DPCDSMQXHVMuW48KpP5jyWkdT1U7scY8N4AfgXU55WQ%40mail.gmail.com.

Re: Issues in generating bindings | Message pipe Colin Blundell 3/22/17 6:51 AM


On Wed, Mar 22, 2017 at 12:44 PM Chandan Kharbanda <chandan....@gmail.com> wrote:
Given my use case what do you suggest ?
Where should I add my .mojom file and how to compile it ?


//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


On Thu, Mar 23, 2017 at 11:46 AM Chandan Kharbanda <chandan....@gmail.com> wrote:
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) ?

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:
Hi Collin,

I and Chandan are working together on this.
We were able to write the implementation file and compile it successfully. Thanks for the guidance.

However, when we try to use mojom to send message from:
/src/net/url_request/url_request_http_job.cc
we are getting an error.

Please find the code and errors received here: http://pastebin.com/tSVWWJmw 

Please mention if we are missing anything here.

Thanks and Regards,
Akash Agrawall
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,

Tried following multiple documents and codes, still didn't get much luck.

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. 

Kindly mention if you have an idea about the error.

Thanks and Regards,
Akash Agrawall