Simplify the public PowerObserver interface
This commit is contained in:
parent
e0e7dd2a8f
commit
8ae3d9dd0b
5 changed files with 23 additions and 34 deletions
|
@ -20,10 +20,12 @@ class PowerObserverLinux : public base::PowerObserver {
|
|||
public:
|
||||
PowerObserverLinux();
|
||||
|
||||
protected:
|
||||
void BlockSleep();
|
||||
void UnblockSleep();
|
||||
void BlockShutdown();
|
||||
void UnblockShutdown();
|
||||
|
||||
virtual bool OnShutdown() { return false; }
|
||||
|
||||
private:
|
||||
|
@ -41,6 +43,7 @@ class PowerObserverLinux : public base::PowerObserver {
|
|||
base::ScopedFD sleep_lock_;
|
||||
base::ScopedFD shutdown_lock_;
|
||||
base::WeakPtrFactory<PowerObserverLinux> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PowerObserverLinux);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue