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

Unified Diff: components/exo/shell_surface.cc

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 72f11c53c45055919cd6cbcda9f83703788b3c8d..f707195c2c21a9a7b1b8ad18b745688a4ee744f4 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -50,6 +50,15 @@ 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());
+ // TODO(oshima): Use SHELF_AUTOHIDE_VISIBLE for SYSTEM_UI_VISIBLE case.
reveman 2016/08/15 17:28:01 nit: SHELF_AUTO_HIDE_VISIBLE
oshima 2016/08/15 17:34:34 I removed it because new MD auto hide does not hav
+ 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) {}
@@ -118,6 +127,7 @@ class CustomWindowStateDelegate : public ash::wm::WindowStateDelegate,
if (widget_) {
bool enter_fullscreen = !window_state->IsFullscreen();
widget_->SetFullscreen(enter_fullscreen);
+ UpdateShelfStateForFullscreenChange(widget_);
}
return true;
}
@@ -390,6 +400,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) {

Powered by Google App Engine
This is Rietveld 408576698