blob: 5f784d09b50016d0151e8c7dd082b024375a82b8 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <map>
#include <vector>
#include "ash/ash_export.h"
#include "base/macros.h"
#include "ui/aura/window_observer.h"
namespace aura {
class Window;
} // namespace aura
namespace ash {
// ScopedOverviewHideWindows hides the list of windows in overview mode,
// remembers their visibility and recovers the visibility after overview mode.
class ASH_EXPORT ScopedOverviewHideWindows : public aura::WindowObserver {
// |windows| the list of windows to hide in overview mode. If |force_hidden|
// is true, the hidden windows may have their visibility altered during
// overview, but we want to keep them hidden.
ScopedOverviewHideWindows(const std::vector<aura::Window*>& windows,
bool force_hidden);
~ScopedOverviewHideWindows() override;
// aura::WindowObserver:
void OnWindowDestroying(aura::Window* window) override;
void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
std::map<aura::Window*, bool> window_visibility_;
bool force_hidden_;
} // namespace ash