Replies: 3 comments
-
Small update: I've managed to load extensions, though with some limitations. Extensions that require GUI modifications or setting changes aren't fully compatible with CEF, but those that don't require interaction load successfully. The process involves downloading the extension's .crx file, modifying its binary data to convert it into a .zip archive, and then using the command-line argument mentioned earlier to load the extracted extension. |
Beta Was this translation helpful? Give feedback.
-
I've recently managed to load extensions in CEF, albeit with some limitations. Extensions that depend on GUI modifications or dynamic setting changes aren’t fully supported, but non-interactive extensions load successfully. The process involves:
Below is a sample Program.cs that demonstrates how to load an extracted extensions:
Note: Extensions that require user interaction (GUI modifications or dynamic settings) may not function as expected. This method only supports non-interactive extensions. The conversion from .crx to .zip is necessary to extract the extension contents, which are then loaded via the command-line argument. I'm looking forward to feedback and any suggestions for further improvements. |
Beta Was this translation helpful? Give feedback.
-
Extensions aren't fully supported when using You can change to using
They should work with |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
CefSharp Version
133.0.6943.127 (Official Build) (64-bit)
Operating System
Windows 11
Architecture
x64
.Net Version
Net4.7.2
Implementation
WinForms
Reproduction Steps
Reproducible Steps:
Visit the Chrome Web Store online.
Click the "Add to Chrome" button.
A standard Chrome-style dialog box appears, asking for confirmation to add the extension.
Once confirmed, a new process (Chromium) starts with its light blue logo.
A complete browser session launches with the new extension installed.
Expected behavior
Expected Behavior:
The extension should load using a designated directory located in the user's local application data folder. The application combines the local application data path with the "Hyper X/Extensions" folder and adds this path to the command-line arguments with the "load-extension" option. However, after the extension is added, it appears that the CRX file is being deleted.
string extensionsDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Hyper X", "Extensions"); settings.CefCommandLineArgs.Add("load-extension", extensionsDir);
Actual behavior
Actual Behavior:
After clicking the "Add to Chrome" button and confirming the installation, a new Chromium-based browser process launches with a light blue logo. This is unexpected, as the extension should load within the current process rather than starting a new instance of Chromium. Additionally, the CRX file is deleted, which prevents the extension from functioning as intended. Extra pice of info : I am auto downloading file via downloadhandler because it rediretcs to download the extension file when clicked on add extension
Regression?
No response
Known Workarounds
No response
Does this problem also occur in the CEF Sample Application
Yes using WPF/OffScreen command line args
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions