Communication between extensions and external applications

2,671 views
Skip to first unread message

Andy

unread,
Sep 25, 2011, 3:56:01 AM9/25/11
to Chromium-extensions, pchm...@gmail.com
Hello friends,

Is it possible to send messages or any signals to or from an Chrome
extension?
I mean to send the signal from external desktop application to an
extension, or from extension to the application?


Boris Smus

unread,
Sep 26, 2011, 4:03:05 PM9/26/11
to Andy, Chromium-extensions
Hi Andy,

You could use web sockets for this. Setup a websocket server on the desktop and run a Chrome extension websocket client, and you've setup a tunnel for Chrome to do just about anything. <x-shameless-plug>I did this for global keybindings and wrote up a blog post: http://smus.com/chrome-media-keys-revisited</x-shameless-plug>

- Boris



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Андрюша Почемучкин

unread,
Sep 27, 2011, 5:14:35 AM9/27/11
to chromium-...@chromium.org
It's a very good idea, thank you! It can help when other ways not exists.

But how to send a command from an external application to a Chrome extension under Windows? There can be a situation when different extensions should receive the message.


2011/9/26 Boris Smus <sm...@chromium.org>

Boris Smus

unread,
Sep 27, 2011, 10:51:49 AM9/27/11
to Андрюша Почемучкин, chromium-...@chromium.org
Hi Andy:

On Tue, Sep 27, 2011 at 2:14 AM, Андрюша Почемучкин <pchm...@gmail.com> wrote:
It's a very good idea, thank you! It can help when other ways not exists.

But how to send a command from an external application to a Chrome extension under Windows?

WebSockets are full duplex connections - you can send data from client to server, and server to client.
 
There can be a situation when different extensions should receive the message.

 You can also have multiple extensions connect to one broadcast server.

Good luck!
- Boris 

2011/9/26 Boris Smus <sm...@chromium.org>
Hi Andy,

You could use web sockets for this. Setup a websocket server on the desktop and run a Chrome extension websocket client, and you've setup a tunnel for Chrome to do just about anything. <x-shameless-plug>I did this for global keybindings and wrote up a blog post: http://smus.com/chrome-media-keys-revisited</x-shameless-plug>

- Boris

On Sun, Sep 25, 2011 at 12:56 AM, Andy <pchm...@gmail.com> wrote:
Hello friends,

Is it possible to send messages or any signals to or from an Chrome
extension?
I mean to send the signal from external desktop application to an
extension, or from extension to the application?


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.



--

Andy

unread,
Sep 28, 2011, 6:26:40 AM9/28/11
to Chromium-extensions
Hi,

So, there are no standard ways in Chrome?

ikatalan

unread,
Sep 28, 2011, 9:35:11 PM9/28/11
to Chromium-extensions
You can inject an npapi plugin to the document. And connect with any
IPC (external app) to the plugin.

Plugins can send events to content script of the doc its injected
into.

It's a bit tricky but works...

On Sep 28, 1:26 pm, Andy <pchmc...@gmail.com> wrote:
> Hi,
>
> So, there are no standard ways in Chrome?
>
> On 27 ÓÅÎ, 17:51, Boris Smus <s...@chromium.org> wrote:> > But how to send a command from an external application to a Chrome
> > > extension under Windows?
>
> > WebSockets are full duplex connections - you can send data from client to
> > server, and server to client.
>
> > > There can be a situation when different extensions should receive the
> > > message.
>
> > šYou can also have multiple extensions connect to one broadcast server.
Reply all
Reply to author
Forward
0 new messages