コード例 #1
0
 public void OnBeforeNavigate(ICefFrame frame, ICefRequest request, CefNavigationType navigation_type, bool isRedirect)
 {
     if (objectCache.TryGetValue(frame.Identifier, out var frameObjectCache))
     {
         frameObjectCache.Values.ToList().ForEach(f => f.Dispose());
         frameObjectCache.Clear();
     }
 }
コード例 #2
0
        public bool OnBeforeNavigation(ICefBrowser browser, ICefFrame frame, ICefRequest request, CefNavigationType navigation_type,
                                       bool isRedirect)
        {
            if (browsers.TryGetValue(browser.Identifier, out var browserController))
            {
                browserController.OnBeforeNavigate(frame, request, navigation_type, isRedirect);
            }

            return(false);
        }