Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8745)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 15690015: Fix crash when JS alert from background page appears during lock screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/stacking_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 1f32b62c552fb4093aad3d26cd138d617c60c46a..9039de9552af74ae144774fa5aeb5e85ab281ff5 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1555,6 +1555,11 @@ bool BrowserView::CanActivate() const {
if (!AppModalDialogQueue::GetInstance()->active_dialog())
return true;
+#if defined(USE_AURA) && defined(OS_CHROMEOS)
+ // On Aura window manager controls all windows so settings focus via PostTask
+ // will make only worse because posted task will keep trying to steal focus.
+ AppModalDialogQueue::GetInstance()->ActivateModalDialog();
+#else
// If another browser is app modal, flash and activate the modal browser. This
// has to be done in a post task, otherwise if the user clicked on a window
// that doesn't have the modal dialog the windows keep trying to get the focus
@@ -1563,6 +1568,7 @@ bool BrowserView::CanActivate() const {
FROM_HERE,
base::Bind(&BrowserView::ActivateAppModalDialog,
activate_modal_dialog_factory_.GetWeakPtr()));
+#endif
return false;
}
« no previous file with comments | « ash/wm/stacking_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698