Beispiel #1
0
        internal unsafe cef_settings_t *CreateNative()
        {
            var ptr = cef_settings_t.Alloc();

            ptr->multi_threaded_message_loop = this.MultiThreadedMessageLoop;
            cef_string_t.Copy(this.CachePath, &ptr->cache_path);
            cef_string_t.Copy(this.UserAgent, &ptr->user_agent);
            cef_string_t.Copy(this.ProductVersion, &ptr->product_version);
            cef_string_t.Copy(this.Locale, &ptr->locale);
            ptr->extra_plugin_paths = CefStringList.CreateHandle(this.ExtraPluginPaths);
            cef_string_t.Copy(this.LogFile, &ptr->log_file);
            ptr->log_severity            = (cef_log_severity_t)this.LogSeverity;
            ptr->release_dcheck_enabled  = this.release_dcheck_enabled;
            ptr->graphics_implementation = (cef_graphics_implementation_t)this.GraphicsImplementation;
            ptr->local_storage_quota     = this.LocalStorageQuota;
            ptr->session_storage_quota   = this.SessionStorageQuota;
            cef_string_t.Copy(this.JavaScriptFlags, &ptr->javascript_flags);

#if WINDOWS
            ptr->auto_detect_proxy_settings_enabled = this.AutoDetectProxySettingsEnabled;
#endif

            cef_string_t.Copy(this.ResourcesDirPath, &ptr->resources_dir_path);
            cef_string_t.Copy(this.LocalesDirPath, &ptr->locales_dir_path);
            ptr->pack_loading_disabled         = this.PackLoadingDisabled;
            ptr->uncaught_exception_stack_size = this.uncaught_exception_stack_size;
            ptr->context_safety_implementation = this.context_safety_implementation;

            return(ptr);
        }
Beispiel #2
0
        /// <summary>
        /// Retrieve the list of file names that are being dragged into the
        /// browser window.
        /// </summary>
        public CefStringList GetFileNames()
        {
            var nList = CefStringList.CreateHandle();

            var success = cef_drag_data_t.invoke_get_file_names(this.ptr, nList) != 0;

            if (success)
            {
                return(CefStringList.From(nList, true));
            }
            else
            {
                CefStringList.DestroyHandle(nList);
                return(null);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Read the keys for the object's values into the specified vector.
        /// Integer- based keys will also be returned as strings.
        /// </summary>
        public bool TryGetKeys(out CefStringList keys)
        {
            ThrowIfObjectIsInvalid();
            var nList = CefStringList.CreateHandle();

            var success = cef_v8value_t.invoke_get_keys(this.ptr, nList) != 0;

            if (success)
            {
                keys = CefStringList.From(nList, true);
                return(true);
            }
            else
            {
                CefStringList.DestroyHandle(nList);
                keys = null;
                return(false);
            }
        }
Beispiel #4
0
 /// <summary>
 /// Set the schemes supported by this manager. By default only "http" and
 /// "https" schemes are supported. Must be called before any cookies are
 /// accessed.
 /// </summary>
 public void SetSupportedSchemes(IEnumerable <string> schemes)
 {
     cef_cookie_manager_t.invoke_set_supported_schemes(this.ptr, CefStringList.CreateHandle(schemes));
 }