#ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_
#define ASH_WM_POWER_BUTTON_CONTROLLER_H_
#include "ash/ash_export.h"
#include "ash/wm/session_state_animator.h"
#include "base/basictypes.h"
#if defined(OS_CHROMEOS)
#include "ui/display/chromeos/output_configurator.h"
#endif
namespace gfx {
class Rect;
class Size;
}
namespace ui {
class Layer;
}
namespace ash {
namespace test {
class PowerButtonControllerTest;
}
class LockStateController;
class ASH_EXPORT PowerButtonController
#if defined(OS_CHROMEOS)
    : public ui::OutputConfigurator::Observer
#endif
      {
 public:
  explicit PowerButtonController(LockStateController* controller);
  virtual ~PowerButtonController();
  void set_has_legacy_power_button_for_test(bool legacy) {
    has_legacy_power_button_ = legacy;
  }
  
  void OnScreenBrightnessChanged(double percent);
  
  void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
  void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp);
#if defined(OS_CHROMEOS)
  
  virtual void OnDisplayModeChanged(
      const ui::OutputConfigurator::DisplayStateList& outputs) OVERRIDE;
#endif
 private:
  friend class test::PowerButtonControllerTest;
  
  bool power_button_down_;
  bool lock_button_down_;
  
  bool brightness_is_zero_;
  
  
  
  bool internal_display_off_and_external_display_on_;
  
  
  bool has_legacy_power_button_;
  LockStateController* controller_; 
  DISALLOW_COPY_AND_ASSIGN(PowerButtonController);
};
}  
#endif