Also pass "webContents" in "login" event

This commit is contained in:
Cheng Zhao 2015-10-28 20:21:56 +08:00
parent 131531219e
commit 4eac6b31b1
4 changed files with 32 additions and 3 deletions

View file

@ -244,6 +244,7 @@ void App::OnSelectCertificate(
void App::OnLogin(LoginHandler* login_handler) {
bool prevent_default = Emit(
"login", login_handler->request(), login_handler->auth_info(),
api::WebContents::CreateFrom(isolate(), login_handler->GetWebContents()),
base::Bind(&PassLoginInformation, make_scoped_refptr(login_handler)));
// Default behavior is to alwasy cancel the auth.