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

Unified Diff: ash/wm/window_util.cc

Issue 2782223002: Add ability to have active window autohide shelf (Closed)
Patch Set: Add ability to have active window autohide shelf 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
Index: ash/wm/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index d4cf8abb70f74beada455cb3e62538a744c60a37..43198c86b11f3d33ba88d3178f40e84bfc3f7545 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,12 @@ void PinWindow(aura::Window* window, bool trusted) {
wm::GetWindowState(window)->OnWMEvent(&event);
}
+void SetAutoHideShelf(aura::Window* window, bool autohide) {
+ wm::GetWindowState(window)->set_hide_shelf_when_active(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);

Powered by Google App Engine
This is Rietveld 408576698