コード例 #1
0
ファイル: CfxBrowserHost.cs プロジェクト: 386845154a/NanUI-1
        /// <summary>
        /// Create a new browser window using the window parameters specified by
        /// |windowInfo|. All values will be copied internally and the actual window will
        /// be created on the UI thread. If |requestContext| is NULL the global request
        /// context will be used. This function can be called on any browser process
        /// thread and will not block.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
        /// </remarks>
        public static bool CreateBrowser(CfxWindowInfo windowInfo, CfxClient client, string url, CfxBrowserSettings settings, CfxRequestContext requestContext)
        {
            var url_pinned = new PinnedString(url);
            var __retval   = CfxApi.cfx_browser_host_create_browser(CfxWindowInfo.Unwrap(windowInfo), CfxClient.Unwrap(client), url_pinned.Obj.PinnedPtr, url_pinned.Length, CfxBrowserSettings.Unwrap(settings), CfxRequestContext.Unwrap(requestContext));

            url_pinned.Obj.Free();
            return(0 != __retval);
        }