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

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: Add ash/shell.h bac to merge to m53 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
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698