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


C# CefGlue.CefFrame类代码示例

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


CefFrame类属于Xilium.CefGlue命名空间,在下文中一共展示了CefFrame类的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: LoadErrorEventArgs

		public LoadErrorEventArgs(CefFrame frame, CefErrorCode errorCode, string errorText, string failedUrl)
		{
			Frame = frame;
			ErrorCode = errorCode;
			ErrorText = errorText;
			FailedUrl = failedUrl;
		}
开发者ID:David-Desmaisons,项目名称:MVVM.CEF.Glue,代码行数:7,代码来源:LoadErrorEventArgs.cs

示例3: 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

示例4: OnAddressChange

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

示例5: GetContext

        internal IWebView GetContext(CefFrame frame)
        {
            var taskCompletionSource = _TaskCompletionSources.GetOrDefault(frame.Identifier);
            if (taskCompletionSource != null)
                return taskCompletionSource.Task.Result;

            return _Associated.GetOrDefault(frame.Identifier);
        }
开发者ID:David-Desmaisons,项目名称:MVVM.CEF.Glue,代码行数:8,代码来源:NeutroniumCefApp.cs

示例6: 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

示例7: 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

示例8: EnsureLoaded

 internal void EnsureLoaded(CefFrame frame)
 {
     var view = GetContext(frame);
     if (view != null)
         return;
     var taskCompletionSource = new TaskCompletionSource<IWebView>();
     _TaskCompletionSources.Add(frame.Identifier, taskCompletionSource);
     //run dummy script to load context
     frame.ExecuteJavaScript("(function(){})()", string.Empty, 0);
 }
开发者ID:David-Desmaisons,项目名称:MVVM.CEF.Glue,代码行数:10,代码来源:NeutroniumCefApp.cs

示例9: OnBeforeNavigation

        protected override bool OnBeforeNavigation(CefBrowser browser, CefFrame frame, CefRequest request, CefNavigationType navigationType, bool isRedirect)
        {
            Console.WriteLine("OnBeforeNavigation: Request.Url={0} NavigationType={1} IsRedirect={2}",
                request.Url,
                navigationType,
                isRedirect
                );

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

示例10: OnQueryEventArgs

 internal OnQueryEventArgs(CefBrowser _browser, CefFrame _frame, long _queryId, string _request, bool _persistent, CefMessageRouterBrowserSide.Callback _callback)
 {
     browser = _browser;
     frame = _frame;
     queryId = _queryId;
     request = _request;
     persistent = _persistent;
     callback = _callback;
     Handled = false; //default return value
 }
开发者ID:rajsite,项目名称:lvcef,代码行数:10,代码来源:LVCefMessageRouterHandler.cs

示例11: Associate

 internal void Associate(CefBrowser browser, CefFrame frame, CefV8Context context)
 {
     var webView = new CefV8_WebView(context,context.GetTaskRunner());
     var taskCompletionSource =  _TaskCompletionSources.GetOrDefault(frame.Identifier);  
     if (taskCompletionSource!=null)
     {
         _TaskCompletionSources.Remove(frame.Identifier);
         taskCompletionSource.TrySetResult(webView);
     }
     _Associated.Add(frame.Identifier, webView);  
 }
开发者ID:David-Desmaisons,项目名称:MVVM.CEF.Glue,代码行数:11,代码来源:NeutroniumCefApp.cs

示例12: OnBeforePopup

        protected override bool OnBeforePopup( CefBrowser browser, CefFrame frame, string targetUrl, string targetFrameName, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref bool noJavascriptAccess )
        {
            var e = new BeforePopupEventArgs( frame, targetUrl, targetFrameName, popupFeatures, windowInfo, client, settings,
                     noJavascriptAccess );

            this.owner.OnBeforePopup( e );

            client = e.Client;
            noJavascriptAccess = e.NoJavascriptAccess;

            return e.Handled;
        }
开发者ID:whztt07,项目名称:SDK,代码行数:12,代码来源:WebLifeSpanHandler.cs

示例13: OnQuery

        public override bool OnQuery(CefBrowser browser, CefFrame frame, long queryId, string request, bool persistent, CefMessageRouterBrowserSide.Callback callback)
        {
            Debug.WriteLine(DBGPREFIX + "OnQuery called, [" + queryId + " " + (persistent ? "" : "not" + " persistent]: ") + request);
	        var handler = OnQueryEvent;
	        if (handler != null)
	        {
                Debug.WriteLine(DBGPREFIX + "OnQuery Delegate");
		        var e = new OnQueryEventArgs(browser, frame, queryId, request, persistent, callback);
		        handler(this, e);
                return e.Handled;
	        }
            return false;
        }
开发者ID:rajsite,项目名称:lvcef,代码行数:13,代码来源:LVCefMessageRouterHandler.cs

示例14: BeforePopupEventArgs

        public BeforePopupEventArgs(
			CefFrame frame,
			string targetUrl,
			string targetFrameName,
			CefPopupFeatures popupFeatures,
			CefWindowInfo windowInfo,
			CefClient client,
			CefBrowserSettings settings,
			bool noJavascriptAccess)
        {
            Frame = frame;
            TargetUrl = targetUrl;
            TargetFrameName = targetFrameName;
            PopupFeatures = popupFeatures;
            WindowInfo = windowInfo;
            Client = client;
            Settings = settings;
            NoJavascriptAccess = noJavascriptAccess;
        }
开发者ID:whztt07,项目名称:SDK,代码行数:19,代码来源:BeforePopupEventArgs.cs

示例15: GetResourceHandler

        protected override CefResourceHandler GetResourceHandler(CefBrowser browser, CefFrame frame, CefRequest request)
        {
            Debug.WriteLine(DBGPREFIX + "OnGetResourceHandler called for URL: " + request.Url);
	        var handler = OnGetResourceHandlerEvent;
	        if (handler != null)
	        {
                LVCefRequest lvCefRequest = new LVCefRequest(OnProcessRequestEvent, OnCancelEvent);
                Debug.WriteLine(DBGPREFIX + "OnGetResourceHandler for URL: " + request.Url + " assigned id " + lvCefRequest.id);
		        var e = new OnGetResourceHandlerEventArgs(lvCefRequest.id, browser, frame, request);
		        handler(this, e);

                if (e.DelegateRequest)
                {
                    Debug.WriteLine(DBGPREFIX + "OnGetResourceHandler for id " + lvCefRequest.id + " to be delegated");
                    return lvCefRequest;
                }
	        }
            Debug.WriteLine(DBGPREFIX + "OnGetResourceHandler for URL: " + request.Url + " to be handled normally by CEF");
            return null;
        }
开发者ID:rajsite,项目名称:lvcef,代码行数:20,代码来源:LVCefRequestHandler.cs


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