protected override void ExecuteInTargetProcess(RemoteConnection connection)
        {
            var sender = CfrStringVisitor.Wrap(this.sender);
            var e      = new CfrStringVisitorVisitEventArgs(eventArgsId);

            sender.raise_Visit(sender, e);
        }
示例#2
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);
        }
示例#3
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);
        }
        /// <summary>
        /// Retrieve this frame's HTML source 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 GetSource(CfrStringVisitor visitor)
        {
            var call = new CfxFrameGetSourceRenderProcessCall();

            call.@this   = proxyId;
            call.visitor = CfrObject.Unwrap(visitor);
            call.RequestExecution(this);
        }
示例#5
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 connection = RemotePtr.connection;
            var call       = new CfxFrameGetTextRemoteCall();

            call.@this = RemotePtr.ptr;
            if (!CfrObject.CheckConnection(visitor, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "visitor");
            }
            call.visitor = CfrObject.Unwrap(visitor).ptr;
            call.RequestExecution(connection);
        }
示例#6
0
        internal static CfrStringVisitor Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrStringVisitor)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrStringVisitor(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
示例#7
0
        internal static CfrStringVisitor Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrStringVisitor)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrStringVisitor(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }