Only cancel unresponsive event when window close is cancelled.
This commit is contained in:
parent
146ce284de
commit
a070f0fdb6
1 changed files with 4 additions and 3 deletions
|
@ -404,12 +404,13 @@ void NativeWindow::BeforeUnloadFired(content::WebContents* tab,
|
||||||
bool* proceed_to_fire_unload) {
|
bool* proceed_to_fire_unload) {
|
||||||
*proceed_to_fire_unload = proceed;
|
*proceed_to_fire_unload = proceed;
|
||||||
|
|
||||||
if (!proceed)
|
if (!proceed) {
|
||||||
WindowList::WindowCloseCancelled(this);
|
WindowList::WindowCloseCancelled(this);
|
||||||
|
|
||||||
// When the "beforeunload" callback is fired the window is certainly live.
|
// Cancel unresponsive event when window close is cancelled.
|
||||||
window_unresposive_closure_.Cancel();
|
window_unresposive_closure_.Cancel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void NativeWindow::RequestToLockMouse(content::WebContents* web_contents,
|
void NativeWindow::RequestToLockMouse(content::WebContents* web_contents,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue