Index: components/exo/shell_surface.cc |
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc |
index c7beb9ad3988b0e2b5e6409345b55d9809e5dc11..7bafb9d1fd5273a0a6a5c83957fd6682c131fa4f 100644 |
--- a/components/exo/shell_surface.cc |
+++ b/components/exo/shell_surface.cc |
@@ -9,6 +9,7 @@ |
#include "ash/common/wm/window_resizer.h" |
#include "ash/common/wm/window_state.h" |
#include "ash/common/wm/window_state_delegate.h" |
+#include "ash/shell.h" |
#include "ash/wm/window_state_aura.h" |
#include "ash/wm/window_util.h" |
#include "base/logging.h" |
@@ -49,6 +50,14 @@ const struct Accelerator { |
{ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN}, |
{ui::VKEY_F4, ui::EF_ALT_DOWN}}; |
+void UpdateShelfStateForFullscreenChange(views::Widget* widget) { |
+ ash::wm::WindowState* window_state = |
+ ash::wm::GetWindowState(widget->GetNativeWindow()); |
+ window_state->set_shelf_mode_in_fullscreen( |
+ ash::wm::WindowState::SHELF_AUTO_HIDE_INVISIBLE); |
+ ash::Shell::GetInstance()->UpdateShelfVisibility(); |
+} |
+ |
class CustomFrameView : public views::NonClientFrameView { |
public: |
explicit CustomFrameView(views::Widget* widget) : widget_(widget) {} |
@@ -117,6 +126,7 @@ class CustomWindowStateDelegate : public ash::wm::WindowStateDelegate, |
if (widget_) { |
bool enter_fullscreen = !window_state->IsFullscreen(); |
widget_->SetFullscreen(enter_fullscreen); |
+ UpdateShelfStateForFullscreenChange(widget_); |
} |
return true; |
} |
@@ -389,6 +399,7 @@ void ShellSurface::SetFullscreen(bool fullscreen) { |
// state doesn't change. |
ScopedConfigure scoped_configure(this, true); |
widget_->SetFullscreen(fullscreen); |
+ UpdateShelfStateForFullscreenChange(widget_); |
} |
void ShellSurface::SetPinned(bool pinned) { |