/// <summary> /// Create a new CfrV8Value object of type null. /// </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 CreateNull() { var call = new CfxV8ValueCreateNullRenderProcessCall(); call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Create a new CfrV8Value object of type null. /// </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 CreateNull() { var call = new CfxV8ValueCreateNullRemoteCall(); call.RequestExecution(); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <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))); }
/// <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)); }
/// <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)); }
/// <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))); }
/// <summary> /// Create a new CfrV8Value object of type null. /// </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 CreateNull() { var connection = CfxRemoteCallContext.CurrentContext.connection; var call = new CfxV8ValueCreateNullRemoteCall(); call.RequestExecution(connection); return(CfrV8Value.Wrap(new RemotePtr(connection, call.__retval))); }
/// <summary> /// Create a new CfrV8Value object of type string. /// </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 CreateString(string value) { var call = new CfxV8ValueCreateStringRemoteCall(); call.value = value; call.RequestExecution(); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Create a new CfrV8Value object of type array with the specified |length|. /// If |length| is negative the returned array will have length 0. 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 CreateArray(int length) { var call = new CfxV8ValueCreateArrayRemoteCall(); call.length = length; call.RequestExecution(); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Returns the value with the specified identifier 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 GetValue(string key) { var call = new CfxV8ValueGetValueByKeyRenderProcessCall(); call.self = CfrObject.Unwrap(this); call.key = key; call.RequestExecution(this); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Create a new CfrV8Value object of type function. 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 CreateFunction(string name, CfrV8Handler handler) { var call = new CfxV8ValueCreateFunctionRenderProcessCall(); call.name = name; call.handler = CfrObject.Unwrap(handler); call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Returns the value with the specified identifier 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 GetValue(int index) { var call = new CfxV8ValueGetValueByIndexRenderProcessCall(); call.self = CfrObject.Unwrap(this); call.index = index; call.RequestExecution(this); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Returns the value with the specified identifier 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 GetValue(int index) { var call = new CfxV8ValueGetValueByIndexRenderProcessCall(); call.@this = proxyId; call.index = index; call.RequestExecution(this); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Returns the value with the specified identifier 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 GetValue(string key) { var call = new CfxV8ValueGetValueByKeyRemoteCall(); call.@this = RemotePtr.ptr; call.key = key; call.RequestExecution(RemotePtr.connection); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Returns the value with the specified identifier 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 GetValue(int index) { var call = new CfxV8ValueGetValueByIndexRemoteCall(); call.@this = RemotePtr.ptr; call.index = index; call.RequestExecution(RemotePtr.connection); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Create a new CfrV8Value object of type function. 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 CreateFunction(string name, CfrV8Handler handler) { var call = new CfxV8ValueCreateFunctionRemoteCall(); call.name = name; call.handler = CfrObject.Unwrap(handler).ptr; call.RequestExecution(); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Create a new CfrV8Value object of type object with optional accessor /// and/or interceptor. 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, CfrV8Interceptor interceptor) { var call = new CfxV8ValueCreateObjectRemoteCall(); call.accessor = CfrObject.Unwrap(accessor).ptr; call.interceptor = CfrObject.Unwrap(interceptor).ptr; call.RequestExecution(); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Evaluates the specified JavaScript code using this context's global object. /// On success |retval| will be set to the return value, if any, and the /// function will return true (1). On failure |exception| will be set to the /// exception, if any, and the function will return false (0). /// </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 Eval(string code, out CfrV8Value retval, out CfrV8Exception exception) { var call = new CfxV8ContextEvalRenderProcessCall(); call.self = CfrObject.Unwrap(this); call.code = code; call.RequestExecution(this); retval = CfrV8Value.Wrap(call.retval); exception = CfrV8Exception.Wrap(call.exception); return(call.__retval); }
/// <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 connection = CfxRemoteCallContext.CurrentContext.connection; var call = new CfxV8ValueCreateDateRemoteCall(); if (!CfrObject.CheckConnection(date, connection)) { throw new ArgumentException("Render process connection mismatch.", "date"); } call.date = CfrObject.Unwrap(date).ptr; call.RequestExecution(connection); return(CfrV8Value.Wrap(new RemotePtr(connection, call.__retval))); }
/// <summary> /// Execute a string of JavaScript code in this V8 context. The |scriptUrl| /// parameter is the URL where the script in question can be found, if any. The /// |startLine| parameter is the base line number to use for error reporting. /// On success |retval| will be set to the return value, if any, and the /// function will return true (1). On failure |exception| will be set to the /// exception, if any, and the function will return false (0). /// </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 Eval(string code, string scriptUrl, int startLine, out CfrV8Value retval, out CfrV8Exception exception) { var call = new CfxV8ContextEvalRemoteCall(); call.@this = RemotePtr.ptr; call.code = code; call.scriptUrl = scriptUrl; call.startLine = startLine; call.RequestExecution(RemotePtr.connection); retval = CfrV8Value.Wrap(new RemotePtr(connection, call.retval)); exception = CfrV8Exception.Wrap(new RemotePtr(connection, call.exception)); return(call.__retval); }
/// <summary> /// Create a new CfrV8Value object of type function. 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 CreateFunction(string name, CfrV8Handler handler) { var connection = CfxRemoteCallContext.CurrentContext.connection; var call = new CfxV8ValueCreateFunctionRemoteCall(); call.name = name; if (!CfrObject.CheckConnection(handler, connection)) { throw new ArgumentException("Render process connection mismatch.", "handler"); } call.handler = CfrObject.Unwrap(handler).ptr; call.RequestExecution(connection); return(CfrV8Value.Wrap(new RemotePtr(connection, call.__retval))); }
/// <summary> /// Execute the function using the current V8 context. This function should /// only be called from within the scope of a CfrV8Handler or /// CfrV8Accessor callback, or in combination with calling enter() and /// exit() on a stored CfrV8Context reference. |object| is the receiver /// ('this' object) of the function. If |object| is NULL the current 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 ExecuteFunction(CfrV8Value @object, CfrV8Value[] arguments) { var call = new CfxV8ValueExecuteFunctionRemoteCall(); call.@this = RemotePtr.ptr; call.@object = CfrObject.Unwrap(@object).ptr; if (arguments != null) { call.arguments = new IntPtr[arguments.Length]; for (int i = 0; i < arguments.Length; ++i) { call.arguments[i] = CfrObject.Unwrap(arguments[i]).ptr; } } call.RequestExecution(RemotePtr.connection); return(CfrV8Value.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Execute the function using the current V8 context. This function should /// only be called from within the scope of a CfrV8Handler or /// CfrV8Accessor callback, or in combination with calling enter() and /// exit() on a stored CfrV8Context reference. |object| is the receiver /// ('this' object) of the function. If |object| is NULL the current 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 ExecuteFunction(CfrV8Value @object, CfrV8Value[] arguments) { var call = new CfxV8ValueExecuteFunctionRenderProcessCall(); call.self = CfrObject.Unwrap(this); call.@object = CfrObject.Unwrap(@object); if (arguments != null) { call.arguments = new IntPtr[arguments.Length]; for (int i = 0; i < arguments.Length; ++i) { call.arguments[i] = CfrObject.Unwrap(arguments[i]); } } call.RequestExecution(this); return(CfrV8Value.Wrap(call.__retval)); }
/// <summary> /// Create a new CfrV8Value object of type object with optional accessor /// and/or interceptor. 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, CfrV8Interceptor interceptor) { var connection = CfxRemoteCallContext.CurrentContext.connection; var call = new CfxV8ValueCreateObjectRemoteCall(); if (!CfrObject.CheckConnection(accessor, connection)) { throw new ArgumentException("Render process connection mismatch.", "accessor"); } call.accessor = CfrObject.Unwrap(accessor).ptr; if (!CfrObject.CheckConnection(interceptor, connection)) { throw new ArgumentException("Render process connection mismatch.", "interceptor"); } call.interceptor = CfrObject.Unwrap(interceptor).ptr; call.RequestExecution(connection); return(CfrV8Value.Wrap(new RemotePtr(connection, call.__retval))); }