Implement powerMonitor "suspend"/"resume" events for Linux.
This commit is contained in:
parent
95cb601f2b
commit
897712359f
5 changed files with 182 additions and 2 deletions
26
atom/browser/lib/power_observer.h
Normal file
26
atom/browser/lib/power_observer.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) 2017 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_LIB_POWER_OBSERVER_H_
|
||||
#define ATOM_BROWSER_LIB_POWER_OBSERVER_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "atom/browser/lib/power_observer_linux.h"
|
||||
#else
|
||||
#include "base/power_monitor/power_observer.h"
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
namespace atom {
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
typedef PowerObserverLinux PowerObserver;
|
||||
#else
|
||||
typedef base::PowerObserver PowerObserver;
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_LIB_POWER_OBSERVER_H_
|
Loading…
Add table
Add a link
Reference in a new issue