From 00eda4e8ccd43b1450a7883765140e2e809a12db Mon Sep 17 00:00:00 2001 From: amaitland Date: Fri, 30 Oct 2015 08:06:46 +1000 Subject: [PATCH] Resolves #1386 - Add UserDataPath Also add JavascriptFlags and UncaughtExceptionStackSize Hopefully all the properties have been exposed now --- CefSharp.Core/CefSettings.h | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CefSharp.Core/CefSettings.h b/CefSharp.Core/CefSettings.h index 4cfb603f8..e44e38545 100644 --- a/CefSharp.Core/CefSettings.h +++ b/CefSharp.Core/CefSettings.h @@ -80,6 +80,20 @@ namespace CefSharp void set(String^ value) { StringUtils::AssignNativeFromClr(_cefSettings->cache_path, value); } } + /// + /// The location where user data such as spell checking dictionary files will + /// be stored on disk. If empty then the default platform-specific user data + /// directory will be used ("~/.cef_user_data" directory on Linux, + /// "~/Library/Application Support/CEF/User Data" directory on Mac OS X, + /// "Local Settings\Application Data\CEF\User Data" directory under the user + /// profile directory on Windows). + /// + property String^ UserDataPath + { + String^ get() { return StringUtils::ToClr(_cefSettings->user_data_path); } + void set(String^ value) { StringUtils::AssignNativeFromClr(_cefSettings->user_data_path, value); } + } + /// /// Set to true in order to completely ignore SSL certificate errors. /// This is NOT recommended. @@ -120,6 +134,17 @@ namespace CefSharp void set(CefSharp::LogSeverity value) { _cefSettings->log_severity = (cef_log_severity_t)value; } } + /// + /// Custom flags that will be used when initializing the V8 JavaScript engine. + /// The consequences of using custom flags may not be well tested. Also + /// configurable using the "js-flags" command-line switch. + /// + property String^ JavascriptFlags + { + String^ get() { return StringUtils::ToClr(_cefSettings->javascript_flags); } + void set(String^ value) { StringUtils::AssignNativeFromClr(_cefSettings->javascript_flags, value); } + } + property bool PackLoadingDisabled { bool get() { return _cefSettings->pack_loading_disabled == 1; } @@ -138,6 +163,19 @@ namespace CefSharp void set(int value) { _cefSettings->remote_debugging_port = value; } } + /// + /// The number of stack trace frames to capture for uncaught exceptions. + /// Specify a positive value to enable the CefRenderProcessHandler:: + /// OnUncaughtException() callback. Specify 0 (default value) and + /// OnUncaughtException() will not be called. Also configurable using the + /// "uncaught-exception-stack-size" command-line switch. + /// + property int UncaughtExceptionStackSize + { + int get() { return _cefSettings->uncaught_exception_stack_size; } + void set(int value) { _cefSettings->uncaught_exception_stack_size = value; } + } + property String^ UserAgent { String^ get() { return StringUtils::ToClr(_cefSettings->user_agent); }