Merge branch 'master' of https://github.com/rotem925/CefSharp into pr97

This commit is contained in:
anthony taranto
2013-02-28 14:59:49 -08:00
4 changed files with 28 additions and 6 deletions
+19 -2
View File
@@ -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);
}
}
}