Chrome extension as service

129 views
Skip to first unread message

Yarco Wang

unread,
Apr 30, 2024, 4:52:34 AM4/30/24
to Chromium Extensions
Original post is here: https://issuetracker.google.com/issues/337552623
Copied. But it is marked as "Infeasible"? So, does that mean it can not be done technically?
====

Original Idea:

I have already installed "Google Translation" in my Chrome, it of course works great!
But I also would like to use it under the terminal. As I am a developer, I'd like to do it in this way:

(create a binary if it named "ts")

  1. ./ts "Some English Text" ==> it will call a "common service" extension
  2. the "common service" can config/list those services exposed by other extensions ==> here, one might be the "Google Translation"
  3. "Google Translation" might have some configs in its manifest.json, e.g., "services: ['translate']"
  4. "common service" here is like some dispatcher in some frameworks (Notice: I've configured the target language, here is "Chinese")
  5. so, finally, I get the translated text in Chinese under console!

I think that is really powerful. It does make the Chrome browser more like a Desktop environment, I can re-use the services the extension provided (not just one service for one extension in chrome).

Oliver Dunk

unread,
Apr 30, 2024, 5:02:20 AM4/30/24
to Yarco Wang, Chromium Extensions
Hi Yarco,

This was marked as infeasible as it was opened under the issues for https://developer.chrome.com/. It isn't actionable from a documentation perspective which is the determination that we make for issues filed in that component.

On the idea itself, it does sound interesting, but seems unlikely to be something we'd do - Chrome's focus is very much on building a user-facing browser, and the team is quite busy with that, so making things behave like a desktop environment isn't really within scope.

In general, the best place for feature requests is https://crbug.com - I'm not sure that it makes sense to open one for this but feel free to use that in the future.

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/33f1f0eb-6beb-4633-8768-ed737a8e9927n%40chromium.org.

Jackie Han

unread,
Apr 30, 2024, 5:33:54 AM4/30/24
to Oliver Dunk, Yarco Wang, Chromium Extensions
For translation service, it is provided by the server side, not by the extension. Native apps should use the official Cloud Translation API.

Native apps can communicate with extensions by Native messaging. But it is not used as a common service.

Yarco Wang

unread,
Apr 30, 2024, 10:29:52 PM4/30/24
to Chromium Extensions, Jackie Han, Yarco Wang, Chromium Extensions, Oliver Dunk
>> On the idea itself, it does sound interesting, but seems unlikely to be something we'd do -- Chrome's focus is very much on building a user-facing browser, and the team is quite busy with that, so making things behave like a desktop environment isn't really within scope.
Glad to know the idea is interesting~ 
Well, I've not tried "Chromium OS" yet, but if it is an OS that shares similar parts with Chrome, I thought such architecture must be attractive.

>> For translation service, it is provided by the server side, not by the extension. Native apps should use the official Cloud Translation API.
Yes. But there are reasons:
1. "Google Translation" service is just an example here, there are also other extensions that might provide functions without external APIs.
2. I can reuse the config defined in Chrome and its context. If I create a standalone client, it would have two configurations; and if there's a proxy extension for visiting the webpage, I can reuse that or else I need to add PROXY/VPN in the client.

>> Native apps can communicate with extensions by Native messaging. But it is not used as a common service.
Yep... Just checked it. It sounds like treating the extension as the client,  using the pipe to open an external executor. 
Extension == Call ==> Native app
But lack of another direction?
Native app == Call ==> Extension 
Reply all
Reply to author
Forward
0 new messages