#ifndef ASH_UTILITY_CLIENT_CONTROLLED_STATE_UTIL_H_
#define ASH_UTILITY_CLIENT_CONTROLLED_STATE_UTIL_H_
#include "ash/ash_export.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "chromeos/ui/base/window_state_type.h"
namespace aura {
class Window;
}
namespace gfx {
class Rect;
}
namespace ash {
class WindowState;
class ClientControlledState;
class ASH_EXPORT ClientControlledStateUtil {
public:
ClientControlledStateUtil() = delete;
using StateChangeRequestCallback =
base::RepeatingCallback<void(WindowState* window_state,
ClientControlledState* state,
chromeos::WindowStateType next_state)>;
using BoundsChangeRequestCallback =
base::RepeatingCallback<void(WindowState* window_state,
ClientControlledState* state,
chromeos::WindowStateType requested_state,
const gfx::Rect& bounds_in_display,
int64_t display_id)>;
static void BuildAndSet(
aura::Window* window,
StateChangeRequestCallback state_change_callback = base::NullCallback(),
BoundsChangeRequestCallback bounds_change_callback =
base::NullCallback());
static void ApplyWindowStateRequest(
WindowState* window_state,
ClientControlledState* client_controlled_state,
chromeos::WindowStateType next_state);
static void ApplyBoundsRequest(WindowState* window_state,
ClientControlledState* client_controlled_state,
chromeos::WindowStateType requested_state,
const gfx::Rect& bounds_in_display,
int64_t display_id);
};
}
#endif