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


C# CefGlue.CefBrowser类代码示例

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


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

示例1: OnLoadEnd

 protected override void OnLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
 {
     if (OnLoadEndEvent != null)
     {
         OnLoadEndEvent(browser, frame, httpStatusCode);
     }
 }
开发者ID:Zaharkov,项目名称:CLRBrowserSourcePlugin,代码行数:7,代码来源:BrowserLoadHandler.cs

示例2: OnAddressChange

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

示例3: ConsoleMessageEventArgs

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

示例4: OnProcessMessageReceived

        protected override bool OnProcessMessageReceived(CefBrowser browser, CefProcessId sourceProcess, CefProcessMessage message)
        {
            if (!this.loggingService.IsDebugEnabled)
            {
                return false;
            }

            this.loggingService.Debug("Client::OnProcessMessageReceived: SourceProcess={0}", sourceProcess);
            this.loggingService.Debug("Message Name={0} IsValid={1} IsReadOnly={2}", message.Name, message.IsValid, message.IsReadOnly);
            var arguments = message.Arguments;
            for (var i = 0; i < arguments.Count; i++)
            {
                var type = arguments.GetValueType(i);
                object value;
                switch (type)
                {
                    case CefValueType.Null: value = null; break;
                    case CefValueType.String: value = arguments.GetString(i); break;
                    case CefValueType.Int: value = arguments.GetInt(i); break;
                    case CefValueType.Double: value = arguments.GetDouble(i); break;
                    case CefValueType.Bool: value = arguments.GetBool(i); break;
                    default: value = null; break;
                }

                this.loggingService.Debug("  [{0}] ({1}) = {2}", i, type, value);
            }

            return false;
        }
开发者ID:axle-h,项目名称:Axh.PageTracker,代码行数:29,代码来源:ScreenshotCefClient.cs

示例5: OnBeforeClose

		protected override void OnBeforeClose(CefBrowser browser)
		{
			if (_core.InvokeRequireOnUi())
                _core.MainUiDispatcher.BeginInvoke((Action)_core.OnBeforeClose);
			else
				_core.OnBeforeClose();
		}
开发者ID:sjoerd222888,项目名称:playground,代码行数:7,代码来源:MyLifeSpanHandler.cs

示例6: DoClose

 protected override bool DoClose(CefBrowser browser)
 {
     Debug.WriteLine(DBGPREFIX + "DoClose");
     // Returning false will send a top level browser close event? guess that is why the labview window closed?
     // Sure does, need to return true and figure out more about the workflow
     return true;
 }
开发者ID:rajsite,项目名称:lvcef,代码行数:7,代码来源:LVCefLifeSpanHandler.cs

示例7: OnProcessMessageReceived

        protected override bool OnProcessMessageReceived(CefBrowser browser, CefProcessId sourceProcess, CefProcessMessage message)
        {
            Console.WriteLine("Render::OnProcessMessageReceived: SourceProcess={0}", sourceProcess);
            Console.WriteLine("Message Name={0} IsValid={1} IsReadOnly={2}", message.Name, message.IsValid, message.IsReadOnly);
            var arguments = message.Arguments;
            for (var i = 0; i < arguments.Count; i++)
            {
                var type = arguments.GetValueType(i);
                object value;
                switch (type)
                {
                    case CefValueType.Null: value = null; break;
                    case CefValueType.String: value = arguments.GetString(i); break;
                    case CefValueType.Int: value = arguments.GetInt(i); break;
                    case CefValueType.Double: value = arguments.GetDouble(i); break;
                    case CefValueType.Bool: value = arguments.GetBool(i); break;
                    default: value = null; break;
                }

                Console.WriteLine("  [{0}] ({1}) = {2}", i, type, value);
            }

            if (message.Name == "myMessage2") return true;

            var message2 = CefProcessMessage.Create("myMessage2");
            var success = browser.SendProcessMessage(CefProcessId.Renderer, message2);
            Console.WriteLine("Sending myMessage2 to renderer process = {0}", success);

            var message3 = CefProcessMessage.Create("myMessage3");
            var success2 = browser.SendProcessMessage(CefProcessId.Browser, message3);
            Console.WriteLine("Sending myMessage3 to browser process = {0}", success);

            return false;
        }
开发者ID:sim0629,项目名称:CefGlue,代码行数:34,代码来源:DemoRenderProcessHandler.cs

示例8: InitTask

        private Task<IWebBrowserWindowProvider> InitTask(string fullpath, IWebSessionLogger logger)
        {
            TaskCompletionSource<IWebBrowserWindowProvider> tcs = new TaskCompletionSource<IWebBrowserWindowProvider>();
            Task.Run(async () =>
            {
                var cefWindowInfo = CefWindowInfo.Create();
                cefWindowInfo.SetAsWindowless(IntPtr.Zero, true);

                //// Settings for the browser window itself (e.g. enable JavaScript?).
                var cefBrowserSettings = new CefBrowserSettings();

                // Initialize some the cust interactions with the browser process.
                var cefClient = new TestCefClient();

                // Start up the browser instance.
                CefBrowserHost.CreateBrowser(cefWindowInfo, cefClient, cefBrowserSettings, fullpath);

                _CefBrowser = await cefClient.GetLoadedBrowserAsync();

                _CefFrame = _CefBrowser.GetMainFrame();
                _TestCefGlueHTMLWindowProvider = new TestCefGlueHTMLWindowProvider(_CefFrame, cefClient);
                tcs.SetResult(_TestCefGlueHTMLWindowProvider);
            });

            return tcs.Task;
        }
开发者ID:David-Desmaisons,项目名称:MVVM.CEF.Glue,代码行数:26,代码来源:CefGlueWindowlessSharedHtmlEngine.cs

示例9: OnProcessMessageReceived

        protected override bool OnProcessMessageReceived(CefBrowser browser, CefProcessId sourceProcess, CefProcessMessage message)
        {
            if (DumpProcessMessages)
            {
                Console.WriteLine("Client::OnProcessMessageReceived: SourceProcess={0}", sourceProcess);
                Console.WriteLine("Message Name={0} IsValid={1} IsReadOnly={2}", message.Name, message.IsValid, message.IsReadOnly);
                var arguments = message.Arguments;
                for (var i = 0; i < arguments.Count; i++)
                {
                    var type = arguments.GetValueType(i);
                    object value;
                    switch (type)
                    {
                        case CefValueType.Null: value = null; break;
                        case CefValueType.String: value = arguments.GetString(i); break;
                        case CefValueType.Int: value = arguments.GetInt(i); break;
                        case CefValueType.Double: value = arguments.GetDouble(i); break;
                        case CefValueType.Bool: value = arguments.GetBool(i); break;
                        default: value = null; break;
                    }

                    Console.WriteLine("  [{0}] ({1}) = {2}", i, type, value);
                }
            }

            var handled = DemoApp.BrowserMessageRouter.OnProcessMessageReceived(browser, sourceProcess, message);
            if (handled) return true;

            if (message.Name == "myMessage2" || message.Name == "myMessage3") return true;

            return false;
        }
开发者ID:rajsite,项目名称:lvcef,代码行数:32,代码来源:WebClient.cs

示例10: OnLoadStart

        protected override void OnLoadStart(CefBrowser browser, CefFrame frame)
        {
            base.OnLoadStart(browser, frame);

            var message = CefProcessMessage.Create("SetOverlayAPI");
            message.Arguments.SetString(0, frame.Name);
            browser.SendProcessMessage(CefProcessId.Renderer, message);
        }
开发者ID:alalwww,项目名称:OverlayPlugin,代码行数:8,代码来源:LoadHandler.cs

示例11: OnGetResourceHandlerEventArgs

 public OnGetResourceHandlerEventArgs(string _id, CefBrowser _browser, CefFrame _frame, CefRequest _request)
 {
     id = _id;
     browser = _browser;
     frame = _frame;
     request = _request;
     DelegateRequest = false; //Default do not delegate, allow CEF to handle using network
 }
开发者ID:rajsite,项目名称:lvcef,代码行数:8,代码来源:LVCefRequestHandler.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:whztt07,项目名称:SDK,代码行数:8,代码来源:WebRenderHandler.cs

示例13: GetRootScreenRect

        protected override bool GetRootScreenRect(CefBrowser browser, ref CefRectangle rect)
        {
            rect.X = 0;
            rect.Y = 0;
            rect.Width = this.screenWidth;
            rect.Height = this.screenHeight;

            return true;
        }
开发者ID:axle-h,项目名称:Axh.PageTracker,代码行数:9,代码来源:ScreenshotRenderHandler.cs

示例14: GetScreenInfo

        protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo)
        {
            var rect = screenInfo.Rectangle;
            this.GetRootScreenRect(browser, ref rect);
            screenInfo.Depth = 32;
            screenInfo.IsMonochrome = false;

            return true;
        }
开发者ID:axle-h,项目名称:Axh.PageTracker,代码行数:9,代码来源:ScreenshotRenderHandler.cs

示例15: OnStatusMessage

 protected override void OnStatusMessage(CefBrowser browser, string value)
 {
     if (browser == null)
     {
         API.Instance.Log("Browser null: invalid OnStatusMessage.");
         return;
     }
     API.Instance.Log("Browser {0}: Status message: {1}", browser.Identifier, value);
 }
开发者ID:Zaharkov,项目名称:CLRBrowserSourcePlugin,代码行数:9,代码来源:BrowserDisplayHandler.cs


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