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

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

Issue 11826068: ash: Disable window caption buttons in immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trivial rebase Created 7 years, 11 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
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 0c560c1a61768842e4933ce5965992af31c52799..66ddf169fd1d2e82f3178ed03dc8298352d10006 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -197,6 +197,16 @@ void BrowserNonClientFrameViewAsh::GetWindowMask(const gfx::Size& size,
}
void BrowserNonClientFrameViewAsh::ResetWindowControls() {
+ // Hide the caption buttons in immersive mode because it's confusing when
+ // the user hovers or clicks in the top-right of the screen and hits one.
+ // Only show them during a reveal.
+ ImmersiveModeController* controller =
+ browser_view()->immersive_mode_controller();
+ bool show_buttons = !controller->enabled() || controller->IsRevealed();
+ immersive_button_->SetVisible(show_buttons);
+ size_button_->SetVisible(show_buttons);
+ close_button_->SetVisible(show_buttons);
+
size_button_->SetState(views::CustomButton::STATE_NORMAL);
// The close button isn't affected by this constraint.
}

Powered by Google App Engine
This is Rietveld 408576698