blob: 1eb02419a33d756e0ee363225455cb6204330ac8 [file] [log] [blame]
// Copyright 2013 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 "ash/ash_export.h"
namespace ash {
enum class WindowStateType;
namespace wm {
class WindowState;
class ASH_EXPORT WindowStateObserver {
virtual ~WindowStateObserver() {}
// Following observer methods are different from kWindowShowStatekey
// property change as they will be invoked when the window
// gets left/right maximized, and auto positioned. |old_type| is the value
// before the change.
// Called after the window's state type is set to new type, but before
// the window's bounds has been updated for the new type.
// This is used to update the shell state such as work area so
// that the window can use the correct environment to update its bounds.
virtual void OnPreWindowStateTypeChange(WindowState* window_state,
WindowStateType old_type) {}
// Called after the window's state has been updated.
// This is used to update the shell state that depends on the updated
// window bounds, such as shelf visibility.
virtual void OnPostWindowStateTypeChange(WindowState* window_state,
WindowStateType old_type) {}
} // namespace wm
} // namespace ash