当前位置: 首页>>代码示例>>C#>>正文


C# CefBrowser类代码示例

本文整理汇总了C#中CefBrowser的典型用法代码示例。如果您正苦于以下问题:C# CefBrowser类的具体用法?C# CefBrowser怎么用?C# CefBrowser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CefBrowser类属于命名空间,在下文中一共展示了CefBrowser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnAddressChange

 protected override void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
     if (frame.IsMain)
     {
         _core.OnAddressChanged(url);
     }
 }
开发者ID:GuoMarvin,项目名称:Xilium.CefGlue,代码行数:7,代码来源:CefWebDisplayHandler.cs

示例2: OnBeforeClose

		protected override void OnBeforeClose(CefBrowser browser)
		{
			if (_core.InvokeRequired)
				_core.BeginInvoke((Action)_core.OnBeforeClose);
			else
				_core.OnBeforeClose();
		}
开发者ID:rajsite,项目名称:lvcef,代码行数:7,代码来源:CefWebLifeSpanHandler.cs

示例3: OnJSPrompt

 protected override bool OnJSPrompt(CefBrowser browser, CefFrame frame, string message, string defaultValue, out bool retval, out string result)
 {
     // TODO: CefWebJSDialogHandler.OnJSPrompt
     retval = false;
     result = null;
     return false;
 }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:7,代码来源:CefWebJSDialogHandler.cs

示例4: OnAddressChange

 protected override void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
     if (frame.IsMain)
     {
        _core.InvokeIfRequired(() => _core.OnAddressChanged(new AddressChangedEventArgs(frame, url)));
     }
 }
开发者ID:rajsite,项目名称:lvcef,代码行数:7,代码来源:CefWebDisplayHandler.cs

示例5: OnNavStateChange

 protected override void OnNavStateChange(CefBrowser browser, bool canGoBack, bool canGoForward)
 {
     #if DIAGNOSTICS
     Cef.Logger.Trace(LogTarget.CefDisplayHandler, "OnNavStateChange: CanGoBack=[{0}] CanGoForward=[{1}]", canGoBack, canGoForward);
     #endif
     this.context.OnNavStateChanged(canGoBack, canGoForward);
 }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:7,代码来源:CefWebDisplayHandler.cs

示例6: ConsoleMessageEventArgs

 public ConsoleMessageEventArgs(CefBrowser browser, string message, string source, int line)
 {
     this.CefBrowser = browser;
     this.Message = message;
     this.Source = source;
     this.Line = line;
 }
开发者ID:timfish,项目名称:MVVM.CEF.Glue,代码行数:7,代码来源:ConsoleMessageEventArgs.cs

示例7: OnConsoleMessage

		protected override bool OnConsoleMessage(CefBrowser browser, string message, string source, int line)
		{
			var e = new ConsoleMessageEventArgs(message, source, line);
			_core.InvokeIfRequired(() => _core.OnConsoleMessage(e));

			return e.Handled;
		}
开发者ID:rajsite,项目名称:lvcef,代码行数:7,代码来源:CefWebDisplayHandler.cs

示例8: OnAfterCreated

        protected override void OnAfterCreated(CefBrowser browser)
        {
            #if DIAGNOSTICS
            Cef.Logger.Trace(LogTarget.CefLifeSpanHandler, "OnAfterCreated");
            #endif

            this.context.OnAfterCreated(browser);

            // TODO: check context state, it can be already closed
            this.context.Attach(browser);

            /*
            if (!browser.IsPopup)
            {
                if (this.context.IsDisposed)
                {
                    browser.Close();
                    return;
                }

                this.context.browser = browser;
                this.context.browserWindowHandle = browser.WindowHandle;

                this.context.SetStyle(ControlStyles.Opaque, true);

                this.context.ResizeBrowserWindow();

                // FIXME: this is invalid - can't be accessed from another thread
                //if (this.control.Focused)
                //{
                //    this.control.browser.SetFocus(true);
                //}
            }
            */
        }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:35,代码来源:CefWebLifeSpanHandler.cs

示例9: OnContextReleased

 protected unsafe override void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context)
 {
     if (_context.MainFrame != null)
     {
         _context.MainFrame.UnbindV8Context();
     }
 }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:7,代码来源:CefWebV8ContextHandler.cs

示例10: OnBeforeBrowse

        protected override bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, CefHandlerNavType navType, bool isRedirect)
        {
            #if DIAGNOSTICS
            Cef.Logger.Trace(LogTarget.CefRequestHandler, "OnBeforeBrowse: Method=[{0}] Url=[{1}] NavType=[{2}] IsRedirect=[{3}]", request.GetMethod(), request.GetURL(), navType, isRedirect);
            #endif

            var cancel = this.context.OnNavigating(frame, request, navType, isRedirect);
            if (cancel) return true;

            if (frame.IsMain)
            {
                // browser navigating to a new page
                this.context.ClearFrames();
                this.context.AttachMainFrame(frame);

                this.context.ClearReadyState();
                this.context.SetFrameReadyState(null, FrameReadyState.Navigating);
            }
            else if ((this.context.ReadyOptions & CefReadyOptions.Frames) != 0)
            {
                this.context.SetFrameReadyState(frame.GetName(), FrameReadyState.Navigating);
            }

            return false;
        }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:25,代码来源:CefWebRequestHandler.cs

示例11: OnTitleChange

        protected override void OnTitleChange(CefBrowser browser, string title)
        {
            #if DIAGNOSTICS
            Cef.Logger.Trace(LogTarget.CefDisplayHandler, "OnTitleChange: Title=[{0}]", title);
            #endif

            this.context.OnTitleChanged(title);
        }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:8,代码来源:CefWebDisplayHandler.cs

示例12: OnCursorChange

 protected override void OnCursorChange(CefBrowser browser, IntPtr cursorHandle)
 {
     _uiHelper.PerformInUiThread(() =>
         {
             Cursor cursor = CursorInteropHelper.Create(new SafeFileHandle(cursorHandle, false));
             _owner.Cursor = cursor;
         });
 }
开发者ID:vebin,项目名称:Xilium.CefGlue,代码行数:8,代码来源:WpfCefRenderHandler.cs

示例13: CefUncaughtExceptionEventArgs

 public CefUncaughtExceptionEventArgs(CefBrowser browser, CefFrame frame, CefV8Context context, CefV8Exception exception, CefV8StackTrace stackTrace)
 {
     this.browser = browser;
     this.frame = frame;
     this.context = context;
     this.exception = exception;
     this.stackTrace = stackTrace;
 }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:8,代码来源:CefUncaughtExceptionEventArgs.cs

示例14: DoClose

        protected override bool DoClose(CefBrowser browser)
        {
            #if DIAGNOSTICS
            Cef.Logger.Trace(LogTarget.CefLifeSpanHandler, "DoClose");
            #endif

            return false;
        }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:8,代码来源:CefWebLifeSpanHandler.cs

示例15: CefBeforePopupEventArgs

 public CefBeforePopupEventArgs(CefBrowser parentBrowser, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, string url, ref CefClient client, CefBrowserSettings settings)
 {
     this.parentBrowser = parentBrowser;
     this.popupFeatures = popupFeatures;
     this.windowInfo = windowInfo;
     this.url = url;
     this.client = client;
     this.settings = settings;
 }
开发者ID:yasoonOfficial,项目名称:cefglue,代码行数:9,代码来源:CefBeforePopupEventArgs.cs


注:本文中的CefBrowser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。