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

Unified Diff: ash/wm/window_util.cc

Issue 2790943003: Add ability to have active window autohide shelf (Closed)
Patch Set: Created 3 years, 9 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 | « ash/wm/window_util.h ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index d4cf8abb70f74beada455cb3e62538a744c60a37..6741eb71efd85ecc2464106c5ee5fad32b69ff23 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "ash/common/ash_constants.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_event.h"
#include "ash/common/wm/wm_screen_util.h"
@@ -83,6 +84,13 @@ void PinWindow(aura::Window* window, bool trusted) {
wm::GetWindowState(window)->OnWMEvent(&event);
}
+void SetAutoHideShelf(aura::Window* window, bool autohide) {
+ wm::GetWindowState(window)->set_autohide_shelf_when_maximized_or_fullscreen(
+ autohide);
+ for (WmWindow* root_window : WmShell::Get()->GetAllRootWindows())
+ WmShelf::ForWindow(root_window)->UpdateVisibilityState();
+}
+
bool MoveWindowToDisplay(aura::Window* window, int64_t display_id) {
DCHECK(window);
WmWindow* root = WmShell::Get()->GetRootWindowForDisplayId(display_id);
« no previous file with comments | « ash/wm/window_util.h ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698