My team and I are working on reducing Chrome power consumption, and are considering writing a third party binary that will be called from Chromium to communicate with an external device (a power meter).We chose to write an external binary rather than include the communication code directly in Chrome because there are other clients that we plan to also communicate with the external device from (Telemetry and Android's systrace).
Communicating with this device will require reading and writing from a serial connection and possibly communicating over sockets.I have a few questions:
- Is there a precedent for shipping a third party binary with Chrome and calling into it?
- Ideally, I'd like to avoid writing my own serial communication and socket code on multiple operating systems, but am guessing that use of third party libraries in a binary that will ultimately be shipped with Chrome is discouraged, as it'll increase the Chrome download size. Is this right? Is there any clever way around this?
Any input is hugely appreciated!
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Why does your code need to be in a separate binary for this? (As opposed to just library code that's linked in)
There's some precedent for shipping separate binaries (Flash; the PDF plugin used to be a separate binary; crashpad_handler on OS X is a separate binary), but doing this has a long list of drawbacks.
Why does your code need to be in a separate binary for this? (As opposed to just library code that's linked in)The other binaries that are communicating with the BattOr are Python binaries. One option that we have is that we could write it as a third party library and link it into Chromium. Then, to make the code usable by the two Python binaries, we could write a small wrapper binary in C++ that just links the library and provides a small command line interface. Does this seem reasonable?
There's some precedent for shipping separate binaries (Flash; the PDF plugin used to be a separate binary; crashpad_handler on OS X is a separate binary), but doing this has a long list of drawbacks.Do you know what those drawbacks are? One obvious one that I see is that our binary wouldn't be included in Chrome-wide tracking metrics, like how much memory Chrome's using.