Add systemPreferences.subscribeNotification

This commit is contained in:
Cheng Zhao 2016-04-25 14:25:14 +09:00
parent ddd8eae661
commit 9557226223
3 changed files with 50 additions and 2 deletions

View file

@ -5,7 +5,10 @@
#ifndef ATOM_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
#define ATOM_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
#include <string>
#include "atom/browser/api/event_emitter.h"
#include "base/callback.h"
#include "native_mate/handle.h"
namespace atom {
@ -21,6 +24,10 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
#if defined(OS_WIN)
bool IsAeroGlassEnabled();
#elif defined(OS_MACOSX)
int SubscribeNotification(const std::string& name,
const base::Closure& callback);
void UnsubscribeNotification(int id);
#endif
bool IsDarkMode();