mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Merge branch 'master' of https://github.com/rotem925/CefSharp into pr97
This commit is contained in:
@@ -193,7 +193,24 @@ namespace CefSharp
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ClientAdapter::GetAuthCredentials(CefRefPtr browser,bool isProxy,const CefString& host,int port,const CefString& realm,const CefString& scheme,CefString& username,CefString& password)
|
||||
{
|
||||
IRequestHandler^ handler = _browserControl->RequestHandler;
|
||||
if (handler == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
String^ uname = nullptr;
|
||||
String^ pass = nullptr;
|
||||
bool handled = handler->GetAuthCredentials(_browserControl,isProxy,toClr(host),port,toClr(realm),toClr(scheme),uname,pass);
|
||||
|
||||
if(uname!=nullptr)
|
||||
username = toNative(uname);
|
||||
if(pass!=nullptr)
|
||||
password = toNative(pass);
|
||||
|
||||
return handled;
|
||||
}
|
||||
void ClientAdapter::OnResourceResponse(CefRefPtr<CefBrowser> browser, const CefString& url, CefRefPtr<CefResponse> response, CefRefPtr<CefContentFilter>& filter)
|
||||
{
|
||||
IRequestHandler^ handler = _browserControl->RequestHandler;
|
||||
@@ -256,4 +273,4 @@ namespace CefSharp
|
||||
{
|
||||
_browserControl->OnTakeFocus(next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user