CommonCefApp.cs 641 B

1234567891011121314151617181920212223
  1. namespace Xilium.CefGlue.Common.Shared
  2. {
  3. internal abstract class CommonCefApp : CefApp
  4. {
  5. private readonly CustomScheme[] _customSchemes;
  6. internal CommonCefApp(CustomScheme[] customSchemes = null)
  7. {
  8. _customSchemes = customSchemes;
  9. }
  10. protected override void OnRegisterCustomSchemes(CefSchemeRegistrar registrar)
  11. {
  12. if (_customSchemes != null)
  13. {
  14. foreach (var scheme in _customSchemes)
  15. {
  16. registrar.AddCustomScheme(scheme.SchemeName, scheme.Options);
  17. }
  18. }
  19. }
  20. }
  21. }