예제 #1
0
        /// <summary>
        /// Creates a new object.
        /// </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 static CfrValue Create()
        {
            var call = new CfxValueCreateRemoteCall();

            call.RequestExecution();
            return(CfrValue.Wrap(new RemotePtr(call.__retval)));
        }
예제 #2
0
        /// <summary>
        /// Creates a new object.
        /// </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 static CfrValue Create()
        {
            var call = new CfxValueCreateRenderProcessCall();

            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #3
0
        /// <summary>
        /// Returns a copy of this object. The underlying data will also be copied.
        /// </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 CfrValue Copy()
        {
            var call = new CfxValueCopyRenderProcessCall();

            call.@this = proxyId;
            call.RequestExecution(this);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #4
0
        /// <summary>
        /// Returns a copy of this object. The underlying data will also be copied.
        /// </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 CfrValue Copy()
        {
            var call = new CfxValueCopyRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.RequestExecution(this);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #5
0
        /// <summary>
        /// Creates a new object.
        /// </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 static CfrValue Create()
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxValueCreateRemoteCall();

            call.RequestExecution(connection);
            return(CfrValue.Wrap(new RemotePtr(connection, call.__retval)));
        }
예제 #6
0
        /// <summary>
        /// Returns a copy of this object. The underlying data will also be copied.
        /// </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 CfrValue Copy()
        {
            var call = new CfxValueCopyRemoteCall();

            call.@this = RemotePtr.ptr;
            call.RequestExecution(RemotePtr.connection);
            return(CfrValue.Wrap(new RemotePtr(call.__retval)));
        }
예제 #7
0
        /// <summary>
        /// Returns the value at the specified index. For simple types the returned
        /// value will copy existing data and modifications to the value will not
        /// modify this object. For complex types (binary, dictionary and list) the
        /// returned value will reference existing data and modifications to the value
        /// will modify this object.
        /// </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 CfrValue GetValue(int index)
        {
            var call = new CfxListValueGetValueRenderProcessCall();

            call.self  = CfrObject.Unwrap(this);
            call.index = index;
            call.RequestExecution(this);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #8
0
        /// <summary>
        /// Returns true (1) if this object and |that| object have an equivalent
        /// underlying value but are not necessarily the same object.
        /// </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 IsEqual(CfrValue that)
        {
            var call = new CfxValueIsEqualRemoteCall();

            call.@this = RemotePtr.ptr;
            call.that  = CfrObject.Unwrap(that).ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
예제 #9
0
        /// <summary>
        /// Returns the value at the specified key. For simple types the returned value
        /// will copy existing data and modifications to the value will not modify this
        /// object. For complex types (binary, dictionary and list) the returned value
        /// will reference existing data and modifications to the value will modify
        /// this object.
        /// </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 CfrValue GetValue(string key)
        {
            var call = new CfxDictionaryValueGetValueRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.key  = key;
            call.RequestExecution(this);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #10
0
        /// <summary>
        /// Returns the value at the specified index. For simple types the returned
        /// value will copy existing data and modifications to the value will not
        /// modify this object. For complex types (binary, dictionary and list) the
        /// returned value will reference existing data and modifications to the value
        /// will modify this object.
        /// </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 CfrValue GetValue(ulong index)
        {
            var call = new CfxListValueGetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.index = index;
            call.RequestExecution(RemotePtr.connection);
            return(CfrValue.Wrap(new RemotePtr(call.__retval)));
        }
예제 #11
0
        /// <summary>
        /// Returns true (1) if this object and |that| object have the same underlying
        /// data. If true (1) modifications to this object will also affect |that|
        /// object and vice-versa.
        /// </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 IsSame(CfrValue that)
        {
            var call = new CfxValueIsSameRenderProcessCall();

            call.self = CfrObject.Unwrap(this);
            call.that = CfrObject.Unwrap(that);
            call.RequestExecution(this);
            return(call.__retval);
        }
예제 #12
0
        /// <summary>
        /// Returns true (1) if this object and |that| object have an equivalent
        /// underlying value but are not necessarily the same object.
        /// </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 IsEqual(CfrValue that)
        {
            var call = new CfxValueIsEqualRenderProcessCall();

            call.@this = proxyId;
            call.that  = CfrObject.Unwrap(that);
            call.RequestExecution(this);
            return(call.__retval);
        }
예제 #13
0
        /// <summary>
        /// Returns the value at the specified key. For simple types the returned value
        /// will copy existing data and modifications to the value will not modify this
        /// object. For complex types (binary, dictionary and list) the returned value
        /// will reference existing data and modifications to the value will modify
        /// this object.
        /// </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 CfrValue GetValue(string key)
        {
            var call = new CfxDictionaryValueGetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.key   = key;
            call.RequestExecution(RemotePtr.connection);
            return(CfrValue.Wrap(new RemotePtr(call.__retval)));
        }
예제 #14
0
        /// <summary>
        /// Returns the value at the specified index. For simple types the returned
        /// value will copy existing data and modifications to the value will not
        /// modify this object. For complex types (binary, dictionary and list) the
        /// returned value will reference existing data and modifications to the value
        /// will modify this object.
        /// </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 CfrValue GetValue(int index)
        {
            var call = new CfxListValueGetValueRenderProcessCall();

            call.@this = proxyId;
            call.index = index;
            call.RequestExecution(this);
            return(CfrValue.Wrap(call.__retval));
        }
예제 #15
0
        /// <summary>
        /// Sets the value at the specified index. Returns true (1) if the value was
        /// set successfully. If |value| represents simple data then the underlying
        /// data will be copied and modifications to |value| will not modify this
        /// object. If |value| represents complex data (binary, dictionary or list)
        /// then the underlying data will be referenced and modifications to |value|
        /// will modify this object.
        /// </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 SetValue(int index, CfrValue value)
        {
            var call = new CfxListValueSetValueRenderProcessCall();

            call.@this = proxyId;
            call.index = index;
            call.value = CfrObject.Unwrap(value);
            call.RequestExecution(this);
            return(call.__retval);
        }
예제 #16
0
        /// <summary>
        /// Sets the value at the specified index. Returns true (1) if the value was
        /// set successfully. If |value| represents simple data then the underlying
        /// data will be copied and modifications to |value| will not modify this
        /// object. If |value| represents complex data (binary, dictionary or list)
        /// then the underlying data will be referenced and modifications to |value|
        /// will modify this object.
        /// </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 SetValue(ulong index, CfrValue value)
        {
            var call = new CfxListValueSetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.index = index;
            call.value = CfrObject.Unwrap(value).ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
예제 #17
0
        /// <summary>
        /// Sets the value at the specified key. Returns true (1) if the value was set
        /// successfully. If |value| represents simple data then the underlying data
        /// will be copied and modifications to |value| will not modify this object. If
        /// |value| represents complex data (binary, dictionary or list) then the
        /// underlying data will be referenced and modifications to |value| will modify
        /// this object.
        /// </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 SetValue(string key, CfrValue value)
        {
            var call = new CfxDictionaryValueSetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.key   = key;
            call.value = CfrObject.Unwrap(value).ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
예제 #18
0
        /// <summary>
        /// Sets the value at the specified key. Returns true (1) if the value was set
        /// successfully. If |value| represents simple data then the underlying data
        /// will be copied and modifications to |value| will not modify this object. If
        /// |value| represents complex data (binary, dictionary or list) then the
        /// underlying data will be referenced and modifications to |value| will modify
        /// this object.
        /// </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 SetValue(string key, CfrValue value)
        {
            var call = new CfxDictionaryValueSetValueRenderProcessCall();

            call.self  = CfrObject.Unwrap(this);
            call.key   = key;
            call.value = CfrObject.Unwrap(value);
            call.RequestExecution(this);
            return(call.__retval);
        }
예제 #19
0
        /// <summary>
        /// Returns true (1) if this object and |that| object have an equivalent
        /// underlying value but are not necessarily the same object.
        /// </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 IsEqual(CfrValue that)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxValueIsEqualRemoteCall();

            call.@this = RemotePtr.ptr;
            if (!CfrObject.CheckConnection(that, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "that");
            }
            call.that = CfrObject.Unwrap(that).ptr;
            call.RequestExecution(connection);
            return(call.__retval);
        }
예제 #20
0
        /// <summary>
        /// Sets the value at the specified index. Returns true (1) if the value was
        /// set successfully. If |value| represents simple data then the underlying
        /// data will be copied and modifications to |value| will not modify this
        /// object. If |value| represents complex data (binary, dictionary or list)
        /// then the underlying data will be referenced and modifications to |value|
        /// will modify this object.
        /// </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 SetValue(ulong index, CfrValue value)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxListValueSetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.index = index;
            if (!CfrObject.CheckConnection(value, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "value");
            }
            call.value = CfrObject.Unwrap(value).ptr;
            call.RequestExecution(connection);
            return(call.__retval);
        }
예제 #21
0
        internal static CfrValue Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrValue)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrValue(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
예제 #22
0
        internal static CfrValue Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrValue)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrValue(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }