[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / chromeos / dbus / root_power_manager_observer.h
blob7bb9ab471000371dcb362dc2f7e626cdf522e4e9
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_DBUS_ROOT_POWER_MANAGER_OBSERVER_H_
6 #define CHROMEOS_DBUS_ROOT_POWER_MANAGER_OBSERVER_H_
8 #include "base/time.h"
9 #include "chromeos/chromeos_export.h"
11 namespace chromeos {
13 class CHROMEOS_EXPORT RootPowerManagerObserver {
14 public:
15 // Called when the power button is pressed or released.
16 virtual void OnPowerButtonEvent(bool down,
17 const base::TimeTicks& timestamp) {}
19 // Called when the device's lid is opened or closed.
20 virtual void OnLidEvent(bool open, const base::TimeTicks& timestamp) {}
22 // Called when the system resumes from sleep.
23 virtual void OnResume(const base::TimeDelta& sleep_duration) {}
25 protected:
26 virtual ~RootPowerManagerObserver() {}
29 } // namespace chromeos
31 #endif // CHROMEOS_DBUS_ROOT_POWER_MANAGER_OBSERVER_H_