public void Test1() { var list = new CefStringList(); list.Add("String 1"); list.Add("String 2"); list.Add("String 3"); Assert.That(list.Count, Is.EqualTo(3)); Assert.That(list[0], Is.EqualTo("String 1")); Assert.That(list[1], Is.EqualTo("String 2")); Assert.That(list[2], Is.EqualTo("String 3")); var list2 = list.Clone(); list.Clear(); Assert.That(list.Count, Is.EqualTo(0)); // TODO: list.Dispose(); Assert.That(list2.Count, Is.EqualTo(3)); Assert.That(list2[0], Is.EqualTo("String 1")); Assert.That(list2[1], Is.EqualTo("String 2")); Assert.That(list2[2], Is.EqualTo("String 3")); // TODO: list2.Dispose(); }
/// <summary> /// Gets the names of all existing frames. /// </summary> public string[] GetFrameNames() { using (var names = new CefStringList()) { AliveBrowserObject.GetFrameNames(names); return(names.ToArray()); } }
public IEnumerable <string> GetFileNames() { using (var list = new CefStringList()) { Data.GetFileNames(list); foreach (string s in list) { yield return(s); } } }
public IEnumerable <string> GetFrameNames() { // FIXME: require valid state (browser will be attached and context is not dropped) CefStringList frames = null; CefThread.UI.Send((_) => { frames = this.browser.GetFrameNames(); }, null); return(frames.AsEnumerable()); }
public static void Clear(cef_settings_t *self) { cef_string_t.Clear(&self->cache_path); cef_string_t.Clear(&self->user_agent); cef_string_t.Clear(&self->product_version); cef_string_t.Clear(&self->locale); // FIXME: null check? CefStringList.DestroyHandle(self->extra_plugin_paths); cef_string_t.Clear(&self->log_file); cef_string_t.Clear(&self->javascript_flags); cef_string_t.Clear(&self->resources_dir_path); cef_string_t.Clear(&self->locales_dir_path); }
protected internal unsafe override void OnResolveCompleted(CefErrorCode result, CefStringList resolvedIps) { _implementation.OnResolveCompleted(result, resolvedIps); }
public override void OnFaviconUrlChange(CefBrowser browser, CefStringList iconUrls) { _implementation.OnFaviconUrlChange(browser, iconUrls); }
public unsafe void GetCookieableSchemes(CefStringList schemes, ref int includeDefaults) { _application.GetCookieableSchemes(schemes, ref includeDefaults); }
/// <inheritdoc /> internal protected override bool OnFileDialog(CefBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, CefStringList acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback) { callback.Cancel(); return(true); }
/// <summary> /// Called to run a file chooser dialog. /// </summary> /// <param name="browser">The browser object.</param> /// <param name="mode"> /// Represents the type of dialog to display. /// </param> /// <param name="title"> /// The title to be used for the dialog and may be empty to show the default title /// ('Open' or 'Save' depending on the mode). /// </param> /// <param name="defaultFilePath"> /// The path with optional directory and/or file name component that should be /// initially selected in the dialog. /// </param> /// <param name="acceptFilters"> /// Used to restrict the selectable file types and may any combination of /// <list type="bullet"> /// <item>valid lower-cased MIME types (e.g. 'text/*' or 'image/*');</item> /// <item>individual file extensions (e.g. '.txt' or '.png');</item> /// <item> /// combined description and file extension delimited using '|' and /// ';' (e.g. 'Image Types|.png;.gif;.jpg'). /// </item> /// </list> /// </param> /// <param name="selectedAcceptFilter"> /// The 0-based index of the filter that should be selected by default. /// </param> /// <param name="callback">A callback object.</param> /// <returns> /// To display a custom dialog return true and execute <paramref name="callback"/> /// either inline or at a later time. To display the default dialog return false. /// </returns> internal protected virtual bool OnFileDialog(CefBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, CefStringList acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback) { return(false); }
protected internal unsafe override void OnFaviconUrlChange(CefBrowser browser, CefStringList iconUrls) { _implementation.OnFaviconUrlChange(browser, iconUrls); }
/// <summary> /// Called when the page icon changes. /// </summary> /// <param name="browser"></param> /// <param name="iconUrls"></param> internal protected virtual void OnFaviconUrlChange(CefBrowser browser, CefStringList iconUrls) { }
protected internal unsafe override bool OnFileDialog(CefBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, CefStringList acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback) { return(_implementation.OnFileDialog(browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback)); }
protected internal unsafe override void GetCookieableSchemes(CefStringList schemes, ref int includeDefaults) { _implementation.GetCookieableSchemes(schemes, ref includeDefaults); }
public override void OnFileDialogDismissed(bool selectedAcceptFilter, CefStringList filePaths) { _implementation.OnFileDialogDismissed(selectedAcceptFilter, filePaths); }
public override void OnResolveCompleted(CefErrorCode result, CefStringList resolvedIps) { _implementation.OnResolveCompleted(result, resolvedIps); }