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

Unified Diff: chrome/browser/views/browser_actions_container.cc

Issue 459005: Make sure we don't dismiss extension popups when the focus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/views/browser_actions_container.h ('k') | chrome/browser/views/browser_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_actions_container.cc
===================================================================
--- chrome/browser/views/browser_actions_container.cc (revision 33297)
+++ chrome/browser/views/browser_actions_container.cc (working copy)
@@ -459,10 +459,24 @@
popup_->host()->render_view_host()->view()->Focus();
}
-void BrowserActionsContainer::BubbleLostFocus(BrowserBubble* bubble) {
+void BrowserActionsContainer::BubbleLostFocus(BrowserBubble* bubble,
+ gfx::NativeView focused_view) {
if (!popup_)
return;
+#if defined(OS_WIN)
+ // Don't hide when we are loosing focus to a child window. This is the case
+ // with select popups.
+ // TODO(jcampan): http://crbugs.com/29131 make that work on toolkit views
Erik does not do reviews 2009/12/02 01:26:11 typo: crbug.com
+ // so this #if defined can be removed.
+ gfx::NativeView popup_native_view = popup_->native_view();
+ gfx::NativeView parent = focused_view;
+ while (parent = ::GetParent(parent)) {
+ if (parent == popup_native_view)
+ return;
+ }
+#endif
+
// This is a bit annoying. If you click on the button that generated the
// current popup, then we first get this lost focus message, and then
// we get the click action. This results in the popup being immediately
« no previous file with comments | « chrome/browser/views/browser_actions_container.h ('k') | chrome/browser/views/browser_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698