Directly access BrowserSettings as they're internal (extra property and wrapper seems redundant)

This commit is contained in:
amaitland
2015-05-12 14:35:05 +10:00
parent 6805c188e7
commit e0730250fb
2 changed files with 2 additions and 9 deletions
-7
View File
@@ -82,13 +82,6 @@ namespace CefSharp
!BrowserSettings() { delete _browserSettings; _isFinalized = true; }
~BrowserSettings() { if (!_isFinalized) this->!BrowserSettings(); }
// CefBrowserSettings is private causing whole field to be private
// exposing void* as a workaround
property void* _internalBrowserSettings
{
void* get() { return _browserSettings; }
}
property String^ StandardFontFamily
{
String^ get() { return StringUtils::ToClr(_browserSettings->standard_font_family); }
+2 -2
View File
@@ -80,7 +80,7 @@ namespace CefSharp
CefString addressNative = StringUtils::ToNative(address);
if (!CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative,
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings, NULL))
*browserSettings->_browserSettings, NULL))
{
throw gcnew InvalidOperationException( "Failed to create offscreen browser. Call Cef.Initialize() first." );
}
@@ -647,7 +647,7 @@ namespace CefSharp
CefString addressNative = StringUtils::ToNative(address);
CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative,
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
*browserSettings->_browserSettings, NULL);
}
void Resize(int width, int height)