// TODO: functions from cef_trace_event.h (not generated automatically) #endregion #region cef_parser // Methods from cef_parser.h. /// <summary> /// Parse the specified |url| into its component parts. /// Returns false if the URL is empty or invalid. /// </summary> public static bool ParseUrl(string url, out CefUrlParts parts) { fixed(char *url_str = url) { var n_url = new cef_string_t(url_str, url != null ? url.Length : 0); var n_parts = new cef_urlparts_t(); var result = libcef.parse_url(&n_url, &n_parts) != 0; parts = result ? CefUrlParts.FromNative(&n_parts) : null; cef_urlparts_t.Clear(&n_parts); return(result); } }
internal unsafe cef_urlparts_t ToNative() { var result = new cef_urlparts_t(); cef_string_t.Copy(Spec, &result.spec); cef_string_t.Copy(Scheme, &result.scheme); cef_string_t.Copy(UserName, &result.username); cef_string_t.Copy(Password, &result.password); cef_string_t.Copy(Host, &result.host); cef_string_t.Copy(Port, &result.port); cef_string_t.Copy(Origin, &result.origin); cef_string_t.Copy(Path, &result.path); cef_string_t.Copy(Query, &result.query); return(result); }