Beispiel #1
0
        /// <summary>
        /// Remove all existing post data elements.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void RemoveElements()
        {
            var call = new CfxPostDataRemoveElementsRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #2
0
        /// <summary>
        /// Execute the function using the specified V8 context. |object| is the
        /// receiver ('this' object) of the function. If |object| is NULL the specified
        /// context's global object will be used. |arguments| is the list of arguments
        /// that will be passed to the function. Returns the function return value on
        /// success. Returns NULL if this function is called incorrectly or an
        /// exception is thrown.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public CfrV8Value ExecuteFunctionWithContext(CfrV8Context context, CfrV8Value @object, CfrV8Value[] arguments)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxV8ValueExecuteFunctionWithContextRemoteCall();

            call.@this = RemotePtr.ptr;
            if (!CfrObject.CheckConnection(context, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "context");
            }
            call.context = CfrObject.Unwrap(context).ptr;
            if (!CfrObject.CheckConnection(@object, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "object");
            }
            call.@object = CfrObject.Unwrap(@object).ptr;
            if (arguments != null)
            {
                call.arguments = new IntPtr[arguments.Length];
                for (int i = 0; i < arguments.Length; ++i)
                {
                    if (!CheckConnection(arguments[i], connection))
                    {
                        throw new ArgumentException("Render process connection mismatch.", "arguments[" + i + "]");
                    }
                    call.arguments[i] = CfrObject.Unwrap(arguments[i]).ptr;
                }
            }
            call.RequestExecution(connection);
            return(CfrV8Value.Wrap(new RemotePtr(connection, call.__retval)));
        }
Beispiel #3
0
        /// <summary>
        /// Stop loading the page.
        /// </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 void StopLoad()
        {
            var call = new CfxBrowserStopLoadRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #4
0
        /// <summary>
        /// Reload the current page ignoring any cached data.
        /// </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 void ReloadIgnoreCache()
        {
            var call = new CfxBrowserReloadIgnoreCacheRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #5
0
        /// <summary>
        /// Execute select all in this frame.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void SelectAll()
        {
            var call = new CfxFrameSelectAllRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #6
0
        /// <summary>
        /// Reset the command-line switches and arguments but leave the program
        /// component unchanged.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public void Reset()
        {
            var call = new CfxCommandLineResetRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #7
0
        /// <summary>
        /// Navigate forwards.
        /// </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 void GoForward()
        {
            var call = new CfxBrowserGoForwardRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #8
0
        /// <summary>
        /// Remove all contents from the post data element.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void SetToEmpty()
        {
            var call = new CfxPostDataElementSetToEmptyRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
        }
Beispiel #9
0
        /// <summary>
        /// Visit the DOM document. This function can only be called from the render
        /// process.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void VisitDom(CfrDomVisitor visitor)
        {
            var call = new CfxFrameVisitDomRemoteCall();

            call.@this   = RemotePtr.ptr;
            call.visitor = CfrObject.Unwrap(visitor).ptr;
            call.RequestExecution(RemotePtr.connection);
        }
Beispiel #10
0
        /// <summary>
        /// Set the header values. If a Referer value exists in the header map it will
        /// be removed and ignored.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void SetHeaderMap(System.Collections.Generic.List <string[]> headerMap)
        {
            var call = new CfxRequestSetHeaderMapRenderProcessCall();

            call.self      = CfrObject.Unwrap(this);
            call.headerMap = headerMap;
            call.RequestExecution(this);
        }
Beispiel #11
0
        /// <summary>
        /// Get the header values. Will not include the Referer value if any.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public System.Collections.Generic.List <string[]> GetHeaderMap()
        {
            var call = new CfxRequestGetHeaderMapRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #12
0
        /// <summary>
        /// Create a new CfrV8Value object of type Date. This function should only be
        /// called from within the scope of a CfrRenderProcessHandler,
        /// CfrV8Handler or CfrV8Accessor callback, or in combination with calling
        /// enter() and exit() on a stored CfrV8Context reference.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public static CfrV8Value CreateDate(CfrTime date)
        {
            var call = new CfxV8ValueCreateDateRemoteCall();

            call.date = CfrObject.Unwrap(date).ptr;
            call.RequestExecution();
            return(CfrV8Value.Wrap(new RemotePtr(call.__retval)));
        }
Beispiel #13
0
        /// <summary>
        /// Returns true (1) if this object will re-throw future exceptions. This
        /// attribute exists only in the scope of the current CEF value object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public bool WillRethrowExceptions()
        {
            var call = new CfxV8ValueWillRethrowExceptionsRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #14
0
        /// <summary>
        /// Create a new CfrV8Value object of type object with optional accessor. This
        /// function should only be called from within the scope of a
        /// CfrRenderProcessHandler, CfrV8Handler or CfrV8Accessor callback,
        /// or in combination with calling enter() and exit() on a stored CfrV8Context
        /// reference.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public static CfrV8Value CreateObject(CfrV8Accessor accessor)
        {
            var call = new CfxV8ValueCreateObjectRenderProcessCall();

            call.accessor = CfrObject.Unwrap(accessor);
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrV8Value.Wrap(call.__retval));
        }
Beispiel #15
0
        /// <summary>
        /// Removes all values. Returns true (1) on success.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public bool Clear()
        {
            var call = new CfxDictionaryValueClearRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #16
0
        /// <summary>
        /// Load the specified |url|.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void LoadUrl(string url)
        {
            var call = new CfxFrameLoadUrlRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.url  = url;
            call.RequestExecution(this);
        }
Beispiel #17
0
        /// <summary>
        /// Retrieve this frame's display text as a string sent to the specified
        /// visitor.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void GetText(CfrStringVisitor visitor)
        {
            var call = new CfxFrameGetTextRenderProcessCall();

            call.self    = CfrObject.Unwrap(this);
            call.visitor = CfrObject.Unwrap(visitor);
            call.RequestExecution(this);
        }
Beispiel #18
0
        /// <summary>
        /// Load the request represented by the |request| object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void LoadRequest(CfrRequest request)
        {
            var call = new CfxFrameLoadRequestRemoteCall();

            call.@this   = RemotePtr.ptr;
            call.request = CfrObject.Unwrap(request).ptr;
            call.RequestExecution(RemotePtr.connection);
        }
Beispiel #19
0
        /// <summary>
        /// Retrieve this frame's display text as a string sent to the specified
        /// visitor.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void GetText(CfrStringVisitor visitor)
        {
            var call = new CfxFrameGetTextRemoteCall();

            call.@this   = RemotePtr.ptr;
            call.visitor = CfrObject.Unwrap(visitor).ptr;
            call.RequestExecution(RemotePtr.connection);
        }
Beispiel #20
0
        /// <summary>
        /// The post data element will represent a file.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void SetToFile(string fileName)
        {
            var call = new CfxPostDataElementSetToFileRenderProcessCall();

            call.self     = CfrObject.Unwrap(this);
            call.fileName = fileName;
            call.RequestExecution(this);
        }
Beispiel #21
0
        /// <summary>
        /// Returns true (1) if this task runner belongs to the current thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public bool BelongsToCurrentThread()
        {
            var call = new CfxTaskRunnerBelongsToCurrentThreadRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #22
0
        /// <summary>
        /// Returns the names of all existing frames.
        /// </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 System.Collections.Generic.List <string> GetFrameNames()
        {
            var call = new CfxBrowserGetFrameNamesRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #23
0
        /// <summary>
        /// Load the request represented by the |request| object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void LoadRequest(CfrRequest request)
        {
            var call = new CfxFrameLoadRequestRenderProcessCall();

            call.self    = CfrObject.Unwrap(this);
            call.request = CfrObject.Unwrap(request);
            call.RequestExecution(this);
        }
Beispiel #24
0
        /// <summary>
        /// Returns a writable copy of this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_process_message_capi.h">cef/include/capi/cef_process_message_capi.h</see>.
        /// </remarks>
        public CfrProcessMessage Copy()
        {
            var call = new CfxProcessMessageCopyRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(CfrProcessMessage.Wrap(call.__retval));
        }
Beispiel #25
0
        /// <summary>
        /// Visit the DOM document. This function can only be called from the render
        /// process.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_frame_capi.h">cef/include/capi/cef_frame_capi.h</see>.
        /// </remarks>
        public void VisitDom(CfrDomVisitor visitor)
        {
            var call = new CfxFrameVisitDomRenderProcessCall();

            call.self    = CfrObject.Unwrap(this);
            call.visitor = CfrObject.Unwrap(visitor);
            call.RequestExecution(this);
        }
Beispiel #26
0
        /// <summary>
        /// Create a new CfrZipReader object. The returned object's functions can
        /// only be called from the thread that created the object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_zip_reader_capi.h">cef/include/capi/cef_zip_reader_capi.h</see>.
        /// </remarks>
        public static CfrZipReader Create(CfrStreamReader stream)
        {
            var call = new CfxZipReaderCreateRemoteCall();

            call.stream = CfrObject.Unwrap(stream).ptr;
            call.RequestExecution();
            return(CfrZipReader.Wrap(new RemotePtr(call.__retval)));
        }
Beispiel #27
0
        /// <summary>
        /// Create a new CfrStreamReader object from a custom handler.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_stream_capi.h">cef/include/capi/cef_stream_capi.h</see>.
        /// </remarks>
        public static CfrStreamReader CreateForHandler(CfrReadHandler handler)
        {
            var call = new CfxStreamReaderCreateForHandlerRemoteCall();

            call.handler = CfrObject.Unwrap(handler).ptr;
            call.RequestExecution();
            return(CfrStreamReader.Wrap(new RemotePtr(call.__retval)));
        }
Beispiel #28
0
        /// <summary>
        /// Insert a command before the current command. Common for debuggers, like
        /// "valgrind" or "gdb --args".
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_command_line_capi.h">cef/include/capi/cef_command_line_capi.h</see>.
        /// </remarks>
        public void PrependWrapper(string wrapper)
        {
            var call = new CfxCommandLinePrependWrapperRenderProcessCall();

            call.self    = CfrObject.Unwrap(this);
            call.wrapper = wrapper;
            call.RequestExecution(this);
        }
Beispiel #29
0
        /// <summary>
        /// Exit this context. Call this function only after calling enter(). Returns
        /// true (1) if the scope was exited successfully.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public bool Exit()
        {
            var call = new CfxV8ContextExitRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(call.__retval);
        }
Beispiel #30
0
        /// <summary>
        /// Create a new CfrV8Value object of type Date. This function should only be
        /// called from within the scope of a CfrRenderProcessHandler,
        /// CfrV8Handler or CfrV8Accessor callback, or in combination with calling
        /// enter() and exit() on a stored CfrV8Context reference.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public static CfrV8Value CreateDate(CfrTime date)
        {
            var call = new CfxV8ValueCreateDateRenderProcessCall();

            call.date = CfrObject.Unwrap(date);
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrV8Value.Wrap(call.__retval));
        }