本文整理汇总了C#中Xilium.CefGlue.CefFrame类的典型用法代码示例。如果您正苦于以下问题:C# CefFrame类的具体用法?C# CefFrame怎么用?C# CefFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CefFrame类属于Xilium.CefGlue命名空间,在下文中一共展示了CefFrame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnAddressChange
/// <summary>
/// Called when a frame's address has changed.
/// </summary>
protected virtual void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
{
}
开发者ID:rahmancam,项目名称:ChromeWebBrowserControl,代码行数:6,代码来源:CefDisplayHandler.cs
示例17: OnContextReleased
protected override void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context)
{
Debug.WriteLine(DBGPREFIX + "OnContextReleased called");
_messageRouter.OnContextReleased(browser, frame, context);
}
开发者ID:rajsite,项目名称:lvcef,代码行数:5,代码来源:LVCefRenderProcessHandler.cs
示例18: OnLoadError
protected override void OnLoadError(CefBrowser browser, CefFrame frame, CefErrorCode errorCode, string errorText, string failedUrl)
{
base.OnLoadError(browser, frame, errorCode, errorText, failedUrl);
}
开发者ID:timfish,项目名称:MVVM.CEF.Glue,代码行数:4,代码来源:TestCefLoadHandler.cs
示例19: OnLoadEnd
protected override void OnLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
{
base.OnLoadEnd(browser, frame, httpStatusCode);
_LoadEnded.TrySetResult(browser);
}
开发者ID:timfish,项目名称:MVVM.CEF.Glue,代码行数:5,代码来源:TestCefLoadHandler.cs
示例20: OnBeforePopup
/// <summary>
/// Called on the IO thread before a new popup window is created. The |browser|
/// and |frame| parameters represent the source of the popup request. The
/// |target_url| and |target_frame_name| values may be empty if none were
/// specified with the request. The |popupFeatures| structure contains
/// information about the requested popup window. To allow creation of the
/// popup window optionally modify |windowInfo|, |client|, |settings| and
/// |no_javascript_access| and return false. To cancel creation of the popup
/// window return true. The |client| and |settings| values will default to the
/// source browser's values. The |no_javascript_access| value indicates whether
/// the new browser window should be scriptable and in the same process as the
/// source browser.
/// </summary>
protected virtual bool OnBeforePopup(CefBrowser browser, CefFrame frame, string targetUrl, string targetFrameName, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref bool noJavascriptAccess)
{
return false;
}
开发者ID:GuoMarvin,项目名称:Xilium.CefGlue,代码行数:17,代码来源:CefLifeSpanHandler.cs
注:本文中的Xilium.CefGlue.CefFrame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论