test: use WebContents event to test beforeunload (#23699)

This commit is contained in:
Cheng Zhao 2020-05-26 22:21:38 +09:00 committed by GitHub
parent 0dabd5e8c7
commit 08f288faf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 97 additions and 134 deletions

View file

@ -236,6 +236,12 @@ void ElectronApiServiceImpl::DereferenceRemoteJSCallback(
}
#endif
void ElectronApiServiceImpl::NotifyUserActivation() {
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
if (frame)
frame->NotifyUserActivation();
}
void ElectronApiServiceImpl::TakeHeapSnapshot(
mojo::ScopedHandle file,
TakeHeapSnapshotCallback callback) {