Google Plugin Support #4937
Replies: 2 comments 3 replies
-
It means that with the alloy runtime gone there is no longer the extension loading support. Alloy style does not support it but chrome style does work with extensions and as of 126 there is a devtools load extension call that is pretty sexy: https://chromedevtools.github.io/devtools-protocol/tot/Extensions/#method-loadUnpacked It should have much better extension support now. |
Beta Was this translation helpful? Give feedback.
-
OK so the following are required: Now it may be you still get that error. I did also try to set the entire raw preference blob in a var json = @"{
""oejmofjkmijelromghaoncbbecjiial"": {
""active_permissions"": {
""api"": [
""storage""
],
""explicit_host"": [],
""manifest_permissions"": [],
""scriptable_host"": [
""file:///*"",
""http://*/*"",
""https://*/*""
]
},
""commands"": {},
""content_settings"": [],
""creation_flags"": 38,
""events"": [],
""first_install_time"": ""13372343007931350"",
""from_webstore"": false,
""granted_permissions"": {
""api"": [
""storage""
],
""explicit_host"": [],
""manifest_permissions"": [],
""scriptable_host"": [
""file:///*"",
""http://*/*"",
""https://*/*""
]
},
""incognito_content_settings"": [],
""incognito_preferences"": {},
""last_update_time"": ""13372343007931350"",
""location"": 4,
""newAllowFileAccess"": true,
""path"": ""F:\\my\\extension"",
""preferences"": {},
""regular_only_preferences"": {},
""state"": 1,
""was_installed_by_default"": false,
""was_installed_by_oem"": false,
""withholding_permissions"": false
}
}";
var jObj = JsonSerializer.Deserialize<Dictionary<string, object>>(json);
context.SetPreference("extensions.settings", jStr, out var errSet); It does give an args error but I haven't had time to track down if that is a CEF issue, a CEFSharp thing, or just totally not allowed by chrome. I did try to set the extension id directly but get key now found in those cases. At first I thought CEFSharp wasn't recursively serializing the dictionaries but looking at the code I don't think that is it. I really need to modify the prefs.html cefclient test to take a dictionary and see if that also errors. I haven't found a way to test devtools protocol with the cefclient to see about the loadExtension call. path = char.ToUpper(path[0]) + path.Substring(1);
var bytes = Encoding.Unicode.GetBytes(path);
using var hash = SHA256.Create();
var hashed_bytes = hash.ComputeHash(bytes);
var hexDigits = "abcdefghijklmnop".ToCharArray();
var extID = String.Join("",hashed_bytes.Take(16).Select(b=> $"{hexDigits[b >> 4]}{hexDigits[b & 0xF]}")); |
Beta Was this translation helpful? Give feedback.
-
In earlier versions of CefSharp, there was an IExtensionHandler for extending Chrome extensions. In the new version, IExtensionHandler has been removed. Does this mean that extension support is no longer available, or is there a new method for this? Please let me know, thank you.
Beta Was this translation helpful? Give feedback.
All reactions