WebUSB - access from Chrome extension ?

826 views
Skip to first unread message

andy...@googlemail.com

unread,
Nov 3, 2016, 8:53:17 AM11/3/16
to blink-dev
From the demo, I see the USB devices can be accessed from HTTPS website. We are writing a Chrome extension at moment, and want to access the USB device from our html page inside the extension without relying on a HTTPS server. Is is possible?

PhistucK

unread,
Nov 3, 2016, 8:57:51 AM11/3/16
to Andy, blink-dev
I would imagine so, extensions are considered secure, I believe. Have you tried?
One of the problems is that Origin Trials cannot be enabled for extensions, I believe, so you must enable Web USB in about:flags.

Besides trying before asking (it should only take a few minutes), stackoverflow.com and chromium-extensions are more appropriate for Chrome extension questions. blink-dev is for open web platform contexts only.


PhistucK

On Thu, Nov 3, 2016 at 2:53 PM, andyweav via blink-dev <blin...@chromium.org> wrote:
From the demo, I see the USB devices can be accessed from HTTPS website. We are writing a Chrome extension at moment, and want to access the USB device from our html page inside the extension without relying on a HTTPS server. Is is possible?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Reilly Grant

unread,
Nov 3, 2016, 1:56:39 PM11/3/16
to PhistucK, Andy, blink-dev
I have plans to make the WebUSB API available from Chrome Apps as an alternative to the existing chrome.usb API but there are some technical challenges to integrating it with the Chrome Apps permission model that I haven't had time to work out. There is no plan at the moment to make WebUSB available from a Chrome Extension context.

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

Ian Clelland

unread,
Nov 3, 2016, 3:08:29 PM11/3/16
to Reilly Grant, PhistucK, Andy, blink-dev
And yes, it's true that origin trial APIs aren't available in apps or extensions at all.

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

andy...@googlemail.com

unread,
Nov 3, 2016, 9:00:47 PM11/3/16
to blink-dev, phis...@gmail.com, andy...@googlemail.com
Google is terminating Chrome Apps. What's the point to make the WebUSB work with Chrome Apps ?  We've been using Chrome Apps to access our hardware through serial port APIs. Now Google is killing Chrome Apps so we have to look at the alternatives. WebUSB + Chrome Extension seems to be the only solution at moment. 

Tired the extension without HTTPS server just now. It doesn't seem to work.

Reilly Grant

unread,
Nov 4, 2016, 11:49:56 AM11/4/16
to andy...@googlemail.com, phis...@gmail.com, web...@chromium.org
[Moving this thread from blink-dev to webusb.]

What problem are you trying to solve by using a Chrome Extension instead of hosting the page on an HTTPS server? If you need the content to be available offline that can be solved with Service Workers.

andy...@googlemail.com

unread,
Nov 4, 2016, 10:57:03 PM11/4/16
to blink-dev, andy...@googlemail.com, phis...@gmail.com, web...@chromium.org
We've been using Chrome Extension for the past 3 years. There are tons of feature supported in Extension that normal web pages won't do. That's why there are thousands of Chrome extensions in Chrome Store. 

Really need to find out a way to communicate with our USB device from the Chrome Extension. 
Reply all
Reply to author
Forward
0 new messages