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

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

Issue 43107: Make fullscreen exit bubble link work by preventing the bubble from ever bein... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « chrome/browser/views/fullscreen_exit_bubble.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/fullscreen_exit_bubble.cc
===================================================================
--- chrome/browser/views/fullscreen_exit_bubble.cc (revision 11478)
+++ chrome/browser/views/fullscreen_exit_bubble.cc (working copy)
@@ -94,6 +94,25 @@
}
+// FullscreenExitPopup ---------------------------------------------------------
+
+class FullscreenExitBubble::FullscreenExitPopup : public views::WidgetWin {
+ public:
+ FullscreenExitPopup() : views::WidgetWin() { }
+ virtual ~FullscreenExitPopup() { }
+
+ // views::WidgetWin:
+ virtual LRESULT OnMouseActivate(HWND window,
+ UINT hittest_code,
+ UINT message) {
+ // Prevent the popup from being activated, so it won't steal focus from the
+ // rest of the browser, and doesn't cause problems with the FocusManager's
+ // "RestoreFocusedView()" functionality.
+ return MA_NOACTIVATE;
+ }
+};
+
+
// FullscreenExitBubble --------------------------------------------------------
const double FullscreenExitBubble::kOpacity = 0.7;
@@ -108,7 +127,7 @@
CommandUpdater::CommandUpdaterDelegate* delegate)
: root_view_(frame->GetRootView()),
delegate_(delegate),
- popup_(new views::WidgetWin()),
+ popup_(new FullscreenExitPopup()),
size_animation_(new SlideAnimation(this)) {
size_animation_->Reset(1);
@@ -126,7 +145,7 @@
popup_->SetLayeredAlpha(static_cast<int>(0xff * kOpacity));
popup_->Init(frame->GetHWND(), GetPopupRect(false), false);
popup_->SetContentsView(view_);
- popup_->Show();
+ popup_->Show(); // This does not activate the popup.
// Start the initial delay timer.
initial_delay_.Start(base::TimeDelta::FromMilliseconds(kInitialDelayMs), this,
« no previous file with comments | « chrome/browser/views/fullscreen_exit_bubble.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698