-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for chrome extensions #1947
Comments
Original comment by Czarek Tomczak (Bitbucket: Czarek, GitHub: Czarek). You might consider mocking some of the APIs that are non-essential, but which would stop the extension from working. For example when Browser Action is implemented, you could mock the Page Action API which is related and many extensions that use Browser Action may use Page Action as well. Page Action API is not essential for an extension, it would still work fine if the API was mocked. The Cookies API seem to be important to be implemented in early stages. This API was available since early Chrome v5 and we know that all websites use cookies. If there was a way to gather statistics about Chrome Extensions to get know which APIs are most commonly used and implement them first, so that CEF supports greatest number of extensions with the least amount of work. Maybe some scraper that downloads all Chrome extensions, unpacks the crx (zip) files and analyzes the source code. |
This link lists the most popular chrome extensions: https://chrome.google.com/webstore/category/popular It seems reasonable to evaluate the top 10 or 20 for API usage (search the code for instances of |
Original comment by Eivind Arvesen (Bitbucket: eivind88). Both Vivaldi and Opera is built on Chromium and supports Chrome-extensions. Both Vivaldi and Opera make their source code available (though Vivaldi does not include code for the GUI). Would it be possible to reach out to them or to use some of their code? **Edit: ** It seems Opera uses an adaptor to install extensions. |
The Chromium code base has multiple layers. CEF currently uses the Content API layer. Chrome, Vivaldi and Opera use the chrome/ layer which sits on top of the Content API later. Extension support is implemented in the chrome/ layer. Consequently it's not a question of missing code but instead an architectural issue that needs to be resolved. We want to do this selectively to avoid exposing untested code paths in CEF. |
Depend directly on chrome targets and unfork code in master revision 3cc539b (bb). |
Move chrome members to BrowserProcess and add ProfileManager support in master revision f4425a9 (bb). |
Unfork streamsPrivate API and add resourcesPrivate and tabs zoom APIs required by the PDF extension in master revision 5732a8d (bb). |
Original comment by Bruno Clementino (Bitbucket: brunojclementino, GitHub: brunojclementino). No estimate of when the extension support possible? |
Unfork chome code related to extensions and pepper plugins in master revision 5444c38 (bb). |
No estimates are available at this time. |
Create a PrefServiceSyncable as required by Chrome in master revision ae74d73 (bb) and 2840 branch revision d3b835e (bb). |
Issue #1815 was marked as a duplicate of this issue. |
|
The process for adding extension support is documented at https://bitbucket.org/chromiumembedded/cef/src/master/libcef/common/extensions/api/README.txt?at=master&fileviewer=file-view-default. For example, compare the tabs API implementation in Chrome and CEF. The Chrome implementation of GetTabById uses the Browser and TabStripModel objects that do not exist in CEF. This code can be converted to the CEF equivalent that uses CefBrowserHostImpl. Similar conversions will be required when implementing other extension APIs. |
Master revision 9cff99d (bb) adds support for loading extensions.
|
Support for Chrome Alarms Extension API added in master revision dddfce4 (bb). This is a good example of how to enable support for APIs implemented at the /extensions layer (versus the /chrome layer). |
Original comment by Andrew Warnick (Bitbucket: AWarnick-ADSI). How much trouble would it be to merge this into the Chrome 61 branch? We have a customer who desperately needs to run an extension. |
Support for Chrome Storage Extension API (chrome.storage.local and chrome.storage.sync) added in master revision d8a602e (bb) and 3202 branch revision ff8b4aa (bb). |
@AWarnick-ADSI 61 is currently stable so it will only receive bug fixes. The extension changes will be available in 62 and later. |
Original comment by fengxingren (Bitbucket: fengxingren, GitHub: fengxingren). out\Debug_GN_x86\cefclient.exe crashed when launched with "--single-process --load-extension=set_page_color". |
@fengxingren there are no plans to support single-process mode. |
Original comment by fengxingren (Bitbucket: fengxingren, GitHub: fengxingren). @magreenblatt Thanks for your reply. As I understand it, the extension process is like the devtool process, and the latter can be supported in single-process mode. So How much trouble would it be to support it? Or is it just technically not feasible? I want to use the React Developer Tools extension within CEF3 in single-process mode. It would be appreciated if you could give me some suggestions about how to implement the extension support of single-process mode. |
To support the React Developer Tools extension (v2.5.1) we need to add:
|
chrome.tabs.create added in master revision 607a1d9 (bb) and 3202 branch revision 531f5a3 (bb). |
Original comment by Andrew Warnick (Bitbucket: AWarnick-ADSI). I noticed this message in the client app: We use different request contexts in most browsers. I assume that's going to be a problem. Are you able to explain why, and is there a possibility of a work-around? |
@AWarnick-ADSI Extensions need to be registered in each RequestContext separately. The restriction in cefclient is just to simplify the sample application implementation. |
Original comment by vinnyq12 (Bitbucket: vinnyq12). Hi, is there somewhere I can view the status of extension support? What is and isn't supported yet etc. Thanks. |
@vinnyq12 Load chrome://extensions-support in CEF to see the list of supported Chrome APIs. |
Original comment by Artur Chudzik (Bitbucket: arturchudzik). Hello, is there any progress with chrome.webRequest API? |
Original comment by Artur Chudzik (Bitbucket: arturchudzik). @xforce_dev any news? :) |
Original comment by Alexander Guettler (Bitbucket: xforce, GitHub: xforce). @arturchudzik I still plan on working on this, there were just a few things that came up which are a bit more important in my opinion, also wanted to submit some of the other things I had floating around in my custom cef version before doing new things, then there is this Viz change that kind of blew up a bit and required quite some time. |
Original comment by Michael Bragilevsky (Bitbucket: Michael Bragilevsky). Hello, is there any intention to support IETab extension ? |
Original comment by James Bright (Bitbucket: James Bright). How to load “Windows 10 Accounts“ chrome extension in CEF? This extension allows Microsoft users to connect via Azure and Microsoft websites |
Original comment by Jorge R Lima (Bitbucket: limanima, GitHub: limanima). I need exactly the same thing as James Bright. “How to load “Windows 10 Accounts“ chrome extension in CEF?” It seems that the “runtime” api is not yet supported, is this true? “chrome://extensions-support” is not showing that API. |
We will most likely not be supporting additional extension APIs with the current (Alloy) runtime. Extensions will be fully supported with the Chrome runtime. See issue #2969. |
We will not be supporting additional Chrome extension APIs with the current (Alloy) runtime beyond what is required by the PDF viewer extension. See issue #3048 which takes this a step further by proposing complete removal of this functionality from the Alloy runtime in the future. |
|
Original comment by Jason Mah (Bitbucket: Jason Mah). Hi, I am new to CefSharp project and have limited knowledge on extensions. Appreciate if you can advise if it is possible to enable Aspera Connect extension (which is supported by Chrome browser) on CefSharp browser control? Thank you. Regards, Jason Mah |
Original comment by Kevin Dyer (Bitbucket: Kevin Dyer). Hello, Does the extension mechanism support Manifest V3? If yes, what rulesets are supported? I have an extension that I would like to use that replaces the /favicon.ico requests with a redirections to an image bundled within the extension to prevent ZTNA from denying access and this uses a redirect in the ruleset to perform the function. Regards, Kevin Dyer |
…1947) - Supports chrome.storage.local and chrome.storage.sync - chrome.storage.sync behaves identically to chrome.storage.local
Original report by me.
Chrome supports an extension system [1] which generally functions as follows:
CEF will add support for Chrome extensions as a multi-step process:
The first round of implementation will include:
Other APIs under consideration for early implementation include:
Any APIs that require user interface components, such as Browser Action, will be implemented as new CEF APIs that the client application will be responsible for implementing.
This is expected to be a long term project.
[1] https://developer.chrome.com/extensions
[2] https://developer.chrome.com/extensions/api_index
The text was updated successfully, but these errors were encountered: