Skip to content
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

Move CefSettings into Wpf, WinForms and Offscreen namespaces #2477

Closed
amaitland opened this issue Aug 2, 2018 · 4 comments
Closed

Move CefSettings into Wpf, WinForms and Offscreen namespaces #2477

amaitland opened this issue Aug 2, 2018 · 4 comments

Comments

@amaitland
Copy link
Member

To allow for custom settings/command line arguments to be set for the different flavours, this has become more and more important for the WPF/OffScreens versions.

This will be a minor breaking change, you may need to add an additional using statement as CefSettings will no longer be in the CefSharp namespace, there will be a specific version for WPF, WinForms and OffScreen.

For WinForms add using CefSharp.WinForms;
For Wpf add using CefSharp.Wpf;
For OffScreen add using CefSharp.OffScreen;

The Cef.Initialize() method will be removed, it's not required, the first instance of ChromiumWebBrowser you create will Initialize with the default settings if you haven't really called Cef.Initialize yourself.

@amaitland amaitland added this to the 67.0.0 milestone Aug 2, 2018
@amaitland
Copy link
Member Author

Additionally CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled

@amaitland
Copy link
Member Author

Resolved in d87e795

amaitland added a commit that referenced this issue Aug 2, 2018
…ersion

 - This is a breaking change as there is no common `CefSharp.CefSettings`, there is no `CefSharp.Wpf.CefSettings`, `CefSharp.WinForms.CefSettings` and `CefSharp.OffScreen.CefSettings`
 - Cef.Initialize has been removed, the `ChromiumWebBrowser` constructor will call the `Cef.Initialize` with the defaults for your flavour
 - CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled

Resolves #2477
@amaitland
Copy link
Member Author

amaitland commented Aug 2, 2018

  • Update Breaking Changes section of release notes

@amaitland amaitland reopened this Aug 2, 2018
amaitland added a commit to cefsharp/CefSharp.MinimalExample that referenced this issue Sep 5, 2018
CefSharp.CefSettings is now CefSharp.WinForms.CefSettings/CefSharp.Wpf.CefSettings/CefSharp.OffScreen.CefSettings
See cefsharp/CefSharp#2477 for more details

There is one set of settings for each flavour, all the essential command line workarounds are enabled (there are plenty of non-essential ones that have no yet been enabled by default)
@amaitland
Copy link
Member Author

As part of these changes Cef.Initialize() was removed, it hasn't been necessary to call this method for a very long time and only remained as it was included in a lot of old tutorials. Unless you explicitly call Cef.Initialize(settings) or Cef.Initialize(settings, browserProcessHandler) then the first instance of ChromiumWebBrowser will call Cef.Initialze for you, passing in the relevant set of params/command line arguments for the type you are using.

Example

Cef.Initialize(); //THIS LINE NEEDS TO BE REMOVED AND IS SAFE TO DO SO
browser = new ChromiumWebBrowser()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant