New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send events as native macOS notifications #6752

Merged
merged 2 commits into from Aug 9, 2016

Conversation

Projects
None yet
3 participants
@lgalabru
Contributor

lgalabru commented Aug 5, 2016

This PR is about making electron a good inter-process-communication citizen.
I'm working on an electron app, using a native helper/agent/daemon as a backend.
I've been handling IPC using sockets. It works, but it's heavy, and not a great practice.
Since electron supports receiving distributed notifications, it would be great to also make it able to send some of them.

NSNotificationCenter* center = is_local ?
[NSNotificationCenter defaultCenter] :
[NSDistributedNotificationCenter defaultCenter];
[center

This comment has been minimized.

@miniak

miniak Aug 7, 2016

Contributor

The colons should be aligned, like this:

[center
  postNotificationName:base::SysUTF8ToNSString(name)
                object:nil
              userInfo:DictionaryValueToNSDictionary(user_info)
];
@@ -9,6 +9,7 @@
#include "atom/browser/api/event_emitter.h"
#include "base/callback.h"
#include "base/values.h"

This comment has been minimized.

@zcbenz

zcbenz Aug 8, 2016

Contributor

This line is redundant, necessary types should have already been declared.

This comment has been minimized.

@lgalabru

lgalabru Aug 9, 2016

Contributor

That's what I though, but for some reason, the CI is failing if we don't include this header :/
https://travis-ci.org/electron/electron/jobs/150172395

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Aug 9, 2016

👍

@zcbenz zcbenz merged commit 6cd99eb into electron:master Aug 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment