Hide the implementation details of BWebWindow::AuthenticationChallenge() from
clients. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@235 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
@@ -653,31 +653,14 @@ void LauncherWindow::UpdateGlobalHistory(const BString& url)
|
|||||||
BrowsingHistory::defaultInstance()->addItem(BrowsingHistoryItem(url));
|
BrowsingHistory::defaultInstance()->addItem(BrowsingHistoryItem(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LauncherWindow::AuthenticationChallenge(BMessage* message)
|
bool LauncherWindow::AuthenticationChallenge(BString message, BString& inOutUser,
|
||||||
|
BString& inOutPassword, bool& inOutRememberCredentials, uint32 failureCount)
|
||||||
{
|
{
|
||||||
BString text;
|
|
||||||
bool rememberCredentials = false;
|
|
||||||
uint32 failureCount = 0;
|
|
||||||
BString user;
|
|
||||||
BString password;
|
|
||||||
|
|
||||||
message->FindString("text", &text);
|
|
||||||
message->FindString("user", &user);
|
|
||||||
message->FindString("password", &password);
|
|
||||||
message->FindUInt32("failureCount", &failureCount);
|
|
||||||
|
|
||||||
AuthenticationPanel* panel = new AuthenticationPanel(Frame());
|
AuthenticationPanel* panel = new AuthenticationPanel(Frame());
|
||||||
if (!panel->getAuthentication(text, user, password, rememberCredentials,
|
// Panel auto-destructs.
|
||||||
failureCount > 0, user, password, &rememberCredentials)) {
|
return panel->getAuthentication(message, inOutUser, inOutPassword,
|
||||||
message->SendReply((uint32)0);
|
inOutRememberCredentials, failureCount > 0, inOutUser, inOutPassword,
|
||||||
return;
|
&inOutRememberCredentials);
|
||||||
}
|
|
||||||
|
|
||||||
BMessage reply;
|
|
||||||
reply.AddString("user", user);
|
|
||||||
reply.AddString("password", password);
|
|
||||||
reply.AddBool("rememberCredentials", rememberCredentials);
|
|
||||||
message->SendReply(&reply);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LauncherWindow::updateTitle(const BString& title)
|
void LauncherWindow::updateTitle(const BString& title)
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ private:
|
|||||||
virtual void NavigationCapabilitiesChanged(bool canGoBackward,
|
virtual void NavigationCapabilitiesChanged(bool canGoBackward,
|
||||||
bool canGoForward, bool canStop, BWebView* view);
|
bool canGoForward, bool canStop, BWebView* view);
|
||||||
virtual void UpdateGlobalHistory(const BString& url);
|
virtual void UpdateGlobalHistory(const BString& url);
|
||||||
virtual void AuthenticationChallenge(BMessage* challenge);
|
virtual bool AuthenticationChallenge(BString message, BString& inOutUser,
|
||||||
|
BString& inOutPassword, bool& inOutRememberCredentials,
|
||||||
|
uint32 failureCount);
|
||||||
|
|
||||||
void updateTitle(const BString &title);
|
void updateTitle(const BString &title);
|
||||||
void updateTabGroupVisibility();
|
void updateTabGroupVisibility();
|
||||||
|
|||||||
Reference in New Issue
Block a user