示例#1
0
        /// <summary>
        /// Returns the frame with the specified name, or NULL if not found.
        /// </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 CfxFrame GetFrame(string name)
        {
            var name_pinned = new PinnedString(name);
            var __retval    = CfxApi.Browser.cfx_browser_get_frame(NativePtr, name_pinned.Obj.PinnedPtr, name_pinned.Length);

            name_pinned.Obj.Free();
            return(CfxFrame.Wrap(__retval));
        }
示例#2
0
 internal static CfxFrame Wrap(IntPtr nativePtr)
 {
     if (nativePtr == IntPtr.Zero)
     {
         return(null);
     }
     lock (weakCache) {
         var wrapper = (CfxFrame)weakCache.Get(nativePtr);
         if (wrapper == null)
         {
             wrapper = new CfxFrame(nativePtr);
             weakCache.Add(wrapper);
         }
         else
         {
             CfxApi.cfx_release(nativePtr);
         }
         return(wrapper);
     }
 }
示例#3
0
 /// <summary>
 /// Returns the frame with the specified identifier, or NULL if not found.
 /// </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 CfxFrame GetFrame(long identifier)
 {
     return(CfxFrame.Wrap(CfxApi.Browser.cfx_browser_get_frame_byident(NativePtr, identifier)));
 }