Re: Intent To Implement: Extract device_sensors from /content into /device via Mojification

48 views
Skip to first unread message

Colin Blundell

unread,
May 11, 2015, 6:34:04 AM5/11/15
to Leon, mojo...@chromium.org, chromium-dev

On Mon, May 11, 2015 at 11:55 AM Leon <leon...@intel.com> wrote:
Hi,

I'd like to do the Mojification work for /content/browser/device_sensors/ just like what have been done for /content/browser/battery_status.
Extract them to /device then we can make /content slimmer.
The solution is just similar with battery_status Mojification work.

Would you mind to let me know whether the idea is valid? If it's worth a try I'll start to implement. Thanks a lot~

BR,
Han Leon

Don M

unread,
May 11, 2015, 6:38:22 AM5/11/15
to mojo...@chromium.org, chromium-dev, blun...@chromium.org, Leon
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Anand

unread,
May 13, 2015, 1:06:06 AM5/13/15
to chromi...@chromium.org, blun...@chromium.org, mojo...@chromium.org, leon...@intel.com
My 2c would be to pass on that for now. On brief inspection, it looks like those work by using IPC to set up a shared buffer and then... magic. My question would be, is there a "better" way to do whatever it does using Mojo (i.e. using a DataPipe). The answer is probably no, but I have to ask. So I'd suggest moving onto someting else, and coming back to it later. Unless, of course, you want to re-use those or do something with them.

Leon

unread,
May 13, 2015, 3:34:44 AM5/13/15
to mojo...@chromium.org, chromi...@chromium.org, blun...@chromium.org, leon...@intel.com

For now renderer side has some timer logic to poll the sensor data which is provided via shared memory, if we use DataPipe instead, I'm not sure whether it will bring more data transmission latency or not, so I'm considering to employ Mojo SharedBuffer instead, although I'm not clear with it now.


My draft solution as below, eager to your comments. And, If it is not a good timing to do this work, would you please give some suggestions about some other Mojo work and I'm very happy to contribute. Thanks :)


1st phase:

Just use Mojo service to replace old IPC messages.

Renderer side:

  1. As for DeviceSensorEventPump, keep timer related logic and SharedMemorySeqLockReader related logic,  but disconnect it from PlatformEventObserver, instead let it hold a mojo service ptr to do IPC.

Browser side:

  1. To replace the 3 device_XXX_message_filter, define DeviceSensorsService mojo interface and impl it, register the service to the ServiceRegistry of RenderProcessHost.

  2. Re-use current data fetcher.

  3. Move /content/browser/device_sensors to /device/device_sensors.


2nd phase:

  1. Considering to use Mojo SharedBuffer instead of current base::SharedMemoryHandle. Need to clarify its usage and implementation details later.

  2. After that, as the dependency on base::SharedMemoryHandle disappeared, would consider to impl DeviceSendorsService directly by Java for Android.

Alvaro Navas

unread,
May 13, 2015, 3:49:13 AM5/13/15
to leon...@intel.com, blun...@chromium.org, chromi...@chromium.org, mojo...@chromium.org

Hi,

Well my problem is that my android device with arcanoid technology is very complicated... so, somebody know the asterisk technology?? I need some info about this application!

--
Alvaro Navas.
Ingeniero en Conectividad y Redes.

Han, Leon

unread,
May 13, 2015, 3:58:39 AM5/13/15
to ami...@chromium.org, mojo...@chromium.org, chromi...@chromium.org, blun...@chromium.org

Re-send..

 

From: Leon [mailto:leon...@intel.com]
Sent: Wednesday, May 13, 2015 3:34 PM
To: mojo...@chromium.org
Cc: chromi...@chromium.org; blun...@chromium.org; Han, Leon
Subject: Re: Intent To Implement: Extract device_sensors from /content into /device via Mojification

 

For now renderer side has some timer logic to poll the sensor data which is provided via shared memory, if we use DataPipe instead, I'm not sure whether it will bring more data transmission latency or not, so I'm considering to employ Mojo SharedBuffer instead, although I'm not clear with it now.

 

My draft solution as below, eager to your comments. And, If it is not a good timing to do this work, would you please give some suggestions about some other Mojo work and I'm very happy to contribute. Thanks :)

 

1st phase:

Just use Mojo service to replace old IPC messages.

Renderer side:

1.    As for DeviceSensorEventPump, keep timer related logic and SharedMemorySeqLockReader related logic,  but disconnect it from PlatformEventObserver, instead let it hold a mojo service ptr to do IPC.

Browser side:

1.    To replace the 3 device_XXX_message_filter, define DeviceSensorsService mojo interface and impl it, register the service to the ServiceRegistry of RenderProcessHost.

2.    Re-use current data fetcher.

3.    Move /content/browser/device_sensors to /device/device_sensors.

 

2nd phase:

1.    Considering to use Mojo SharedBuffer instead of current base::SharedMemoryHandle. Need to clarify its usage and implementation details later.

Leon

unread,
May 17, 2015, 10:25:21 PM5/17/15
to chromi...@chromium.org, mojo...@chromium.org, ami...@chromium.org, blun...@chromium.org
Ping. Eager to your comments about this intent :)  Thanks~

BR,
Han Leon

Anand Mistry

unread,
May 17, 2015, 10:48:15 PM5/17/15
to chromi...@chromium.org, mojo...@chromium.org, ami...@chromium.org, blun...@chromium.org
Maybe look up the git history and ask whoever originally implemented it.

Leon

unread,
May 17, 2015, 11:32:10 PM5/17/15
to chromi...@chromium.org, da...@chromium.org, blun...@chromium.org, ha...@chromium.org, leandr...@chromium.org, mojo...@chromium.org, timvo...@chromium.org, jam...@chromium.org, ami...@chromium.org
Thanks a lot. @Amistry

Sorry to disturb, add device_sensors owners here, could you please help review this intent and draft solution? Thanks all.
@darin, jamesr, timvolodine, hans, leandrogracia

Leon

unread,
May 29, 2015, 7:12:08 AM5/29/15
to chromi...@chromium.org, jam...@chromium.org, leandr...@chromium.org, ha...@chromium.org, timvo...@chromium.org, mojo...@chromium.org, da...@chromium.org, blun...@chromium.org, ami...@chromium.org
I uploaded a draft CL which illustrates what I'd like do. It would be very nice if you can help take a look to see whether it makes sense. Thanks~
Reply all
Reply to author
Forward
0 new messages