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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 53503004: Restore focus when infobar closes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index a791d1cd888eb0452f1a280f8ff1e3168f7add6e..365e34db4f059ff2effdc9c190852d51fddac86c 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -333,16 +333,14 @@ void InfoBarView::PlatformSpecificHide(bool animate) {
// false); in this case the second SetFocusManager() call will silently no-op.
SetFocusManager(NULL);
-#if defined(OS_WIN) && !defined(USE_AURA)
if (!animate)
return;
// Do not restore focus (and active state with it) if some other top-level
// window became active.
views::Widget* widget = GetWidget();
- if (!widget || gfx::DoesWindowBelongToActiveWindow(widget->GetNativeView()))
+ if (!widget || widget->IsActive())
FocusLastFocusedExternalView();
-#endif
}
void InfoBarView::PlatformSpecificOnHeightsRecalculated() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698