fix: add method and referrer properties to app login event (#14231)
* refactor: remove brightray/network_delegate.{cc|h} * refactor: respond to http requests through network delegate
This commit is contained in:
parent
6736d4ef29
commit
c8f506a8aa
17 changed files with 258 additions and 404 deletions
|
@ -667,17 +667,17 @@ void App::OnNewWindowForTab() {
|
|||
}
|
||||
#endif
|
||||
|
||||
void App::OnLogin(LoginHandler* login_handler,
|
||||
void App::OnLogin(scoped_refptr<LoginHandler> login_handler,
|
||||
const base::DictionaryValue& request_details) {
|
||||
v8::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
bool prevent_default = false;
|
||||
content::WebContents* web_contents = login_handler->GetWebContents();
|
||||
if (web_contents) {
|
||||
prevent_default =
|
||||
Emit("login", WebContents::CreateFrom(isolate(), web_contents),
|
||||
request_details, login_handler->auth_info(),
|
||||
base::Bind(&PassLoginInformation, WrapRefCounted(login_handler)));
|
||||
prevent_default = Emit(
|
||||
"login", WebContents::CreateFrom(isolate(), web_contents),
|
||||
request_details, login_handler->auth_info(),
|
||||
base::Bind(&PassLoginInformation, base::RetainedRef(login_handler)));
|
||||
}
|
||||
|
||||
// Default behavior is to always cancel the auth.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue