Exemplo n.º 1
0
        /// <summary>
        /// Returns the value at the specified key as type dictionary. The returned
        /// value will reference existing data and modifications to the value will
        /// modify this object.
        /// </summary>
        public unsafe virtual CefDictionaryValue GetDictionary(string key)
        {
            fixed(char *s0 = key)
            {
                var cstr0 = new cef_string_t {
                    Str = s0, Length = key != null ? key.Length : 0
                };

                return(SafeCall(CefDictionaryValue.Wrap(CefDictionaryValue.Create, NativeInstance->GetDictionary(&cstr0))));
            }
        }
Exemplo n.º 2
0
        // void (*)(_cef_render_process_handler_t* self, _cef_browser_t* browser, _cef_dictionary_value_t* extra_info)*
        private static unsafe void OnBrowserCreatedImpl(cef_render_process_handler_t *self, cef_browser_t *browser, cef_dictionary_value_t *extra_info)
        {
            var instance = GetInstance((IntPtr)self) as CefRenderProcessHandler;

            if (instance == null || ((ICefRenderProcessHandlerPrivate)instance).AvoidOnBrowserCreated())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)browser);
                ReleaseIfNonNull((cef_base_ref_counted_t *)extra_info);
                return;
            }
            instance.OnBrowserCreated(CefBrowser.Wrap(CefBrowser.Create, browser), CefDictionaryValue.Wrap(CefDictionaryValue.Create, extra_info));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Returns all preferences as a dictionary. If |include_defaults| is true (1)
 /// then preferences currently at their default value will be included. The
 /// returned object contains a copy of the underlying preference values and
 /// modifications to the returned object will not modify the underlying
 /// preference values. This function must be called on the browser process UI
 /// thread.
 /// </summary>
 public unsafe virtual CefDictionaryValue GetAllPreferences(bool includeDefaults)
 {
     return(SafeCall(CefDictionaryValue.Wrap(CefDictionaryValue.Create, NativeInstance->GetAllPreferences(includeDefaults ? 1 : 0))));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Returns the value at the specified index as type dictionary. The returned
 /// value will reference existing data and modifications to the value will
 /// modify this object.
 /// </summary>
 public unsafe virtual CefDictionaryValue GetDictionary(long index)
 {
     return(SafeCall(CefDictionaryValue.Wrap(CefDictionaryValue.Create, NativeInstance->GetDictionary(new UIntPtr((ulong)index)))));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Returns the underlying value as type dictionary. The returned reference may
 /// become invalid if the value is owned by another object or if ownership is
 /// transferred to another object in the future. To maintain a reference to the
 /// value after assigning ownership to a dictionary or list pass this object to
 /// the set_value() function instead of passing the returned reference to
 /// set_dictionary().
 /// </summary>
 public unsafe virtual CefDictionaryValue GetDictionary()
 {
     return(SafeCall(CefDictionaryValue.Wrap(CefDictionaryValue.Create, NativeInstance->GetDictionary())));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Returns a writable copy of this object. If |exclude_NULL_children| is true
 /// (1) any NULL dictionaries or lists will be excluded from the copy.
 /// </summary>
 public unsafe virtual CefDictionaryValue Copy(bool excludeEmptyChildren)
 {
     return(SafeCall(CefDictionaryValue.Wrap(CefDictionaryValue.Create, NativeInstance->Copy(excludeEmptyChildren ? 1 : 0))));
 }