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

Unified Diff: chrome/browser/ui/views/immersive_mode_controller.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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.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/immersive_mode_controller.cc
diff --git a/chrome/browser/ui/views/immersive_mode_controller.cc b/chrome/browser/ui/views/immersive_mode_controller.cc
index 301dc25b8ec0bbd1be6c506a4efbce788bbbe84a..99f505e073a9a8a027bb0186a10237d64d441219 100644
--- a/chrome/browser/ui/views/immersive_mode_controller.cc
+++ b/chrome/browser/ui/views/immersive_mode_controller.cc
@@ -310,6 +310,10 @@ void ImmersiveModeController::SetEnabled(bool enabled) {
}
#endif
+ // Ensure window caption buttons are shown/hidden appropriately.
+ browser_view_->frame()->non_client_view()->frame_view()->
+ ResetWindowControls();
+
// Always ensure tab strip is in correct state.
browser_view_->tabstrip()->SetImmersiveStyle(enabled_);
browser_view_->Layout();
@@ -408,6 +412,10 @@ void ImmersiveModeController::StartReveal() {
return;
revealed_ = true;
+ // Reveal shows the window caption buttons.
+ browser_view_->frame()->non_client_view()->frame_view()->
+ ResetWindowControls();
+
// Recompute the bounds of the views when painted normally.
browser_view_->tabstrip()->SetImmersiveStyle(false);
browser_view_->Layout();
@@ -468,6 +476,10 @@ void ImmersiveModeController::EndReveal(Animate animate, Layout layout) {
}
if (layout == LAYOUT_YES) {
+ // Ending reveal hides the window caption buttons.
+ browser_view_->frame()->non_client_view()->frame_view()->
+ ResetWindowControls();
+
browser_view_->tabstrip()->SetImmersiveStyle(enabled_);
browser_view_->Layout();
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698