Example #1
0
        /// <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);
        }
Example #2
0
 /// <summary>
 /// Returns true (1) if this object is sharing the same storage as |that|
 /// object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_context_capi.h">cef/include/capi/cef_request_context_capi.h</see>.
 /// </remarks>
 public bool IsSharingWith(CfxRequestContext other)
 {
     return(0 != CfxApi.cfx_request_context_is_sharing_with(NativePtr, CfxRequestContext.Unwrap(other)));
 }
Example #3
0
 /// <summary>
 /// Creates a new context object that shares storage with |other| and uses an
 /// optional |handler|.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_context_capi.h">cef/include/capi/cef_request_context_capi.h</see>.
 /// </remarks>
 public static CfxRequestContext CreateContextShared(CfxRequestContext other, CfxRequestContextHandler handler)
 {
     return(CfxRequestContext.Wrap(CfxApi.cfx_create_context_shared(CfxRequestContext.Unwrap(other), CfxRequestContextHandler.Unwrap(handler))));
 }
Example #4
0
 /// <summary>
 /// Returns true (1) if this object is pointing to the same context as |that|
 /// object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_context_capi.h">cef/include/capi/cef_request_context_capi.h</see>.
 /// </remarks>
 public bool IsSame(CfxRequestContext other)
 {
     return(0 != CfxApi.cfx_request_context_is_same(NativePtr, CfxRequestContext.Unwrap(other)));
 }
 /// <summary>
 /// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request
 /// functions are supported. Multiple post data elements are not supported and
 /// elements of type PDE_TYPE_FILE are only supported for requests originating
 /// from the browser process. Requests originating from the render process will
 /// receive the same handling as requests originating from Web content -- if the
 /// response contains Content-Disposition or Mime-Type header values that would
 /// not normally be rendered then the response may receive special handling
 /// inside the browser (for example, via the file download code path instead of
 /// the URL request code path). The |request| object will be marked as read-only
 /// after calling this function. In the browser process if |requestContext| is
 /// NULL the global request context will be used. In the render process
 /// |requestContext| must be NULL and the context associated with the current
 /// renderer process' browser will be used.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_urlrequest_capi.h">cef/include/capi/cef_urlrequest_capi.h</see>.
 /// </remarks>
 public static CfxUrlRequest Create(CfxRequest request, CfxUrlRequestClient client, CfxRequestContext requestContext)
 {
     return(CfxUrlRequest.Wrap(CfxApi.UrlRequest.cfx_urlrequest_create(CfxRequest.Unwrap(request), CfxUrlRequestClient.Unwrap(client), CfxRequestContext.Unwrap(requestContext))));
 }