#ifndef ASH_SYSTEM_POWER_POWER_BUTTON_CONTROLLER_TEST_API_H_
#define ASH_SYSTEM_POWER_POWER_BUTTON_CONTROLLER_TEST_API_H_
#include "ash/system/power/power_button_controller.h"
#include "base/memory/raw_ptr.h"
namespace base {
class TickClock;
}
namespace ui {
class KeyEvent;
}
namespace gfx {
class Rect;
}
namespace ash {
class PowerButtonMenuView;
class PowerButtonScreenshotController;
class PowerButtonControllerTestApi {
public:
explicit PowerButtonControllerTestApi(PowerButtonController* controller);
PowerButtonControllerTestApi(const PowerButtonControllerTestApi&) = delete;
PowerButtonControllerTestApi& operator=(const PowerButtonControllerTestApi&) =
delete;
~PowerButtonControllerTestApi();
bool PreShutdownTimerIsRunning() const;
[[nodiscard]] bool TriggerPreShutdownTimeout();
bool PowerButtonMenuTimerIsRunning() const;
[[nodiscard]] bool TriggerPowerButtonMenuTimeout();
void SendKeyEvent(ui::KeyEvent* event);
gfx::Rect GetMenuBoundsInScreen() const;
PowerButtonMenuView* GetPowerButtonMenuView() const;
ui::Layer* GetPowerButtonMenuBackgroundLayer() const;
bool IsMenuOpened() const;
bool MenuHasPowerOffItem() const;
bool MenuHasSignOutItem() const;
bool MenuHasLockScreenItem() const;
bool MenuHasCaptureModeItem() const;
bool MenuHasFeedbackItem() const;
PowerButtonScreenshotController* GetScreenshotController();
void SetTickClock(const base::TickClock* tick_clock);
void SetShowMenuAnimationDone(bool show_menu_animation_done);
bool ShowMenuAnimationDone() const;
private:
raw_ptr<PowerButtonController, DanglingUntriaged> controller_;
};
}
#endif