node_bindings_mac.h 844 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2013 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef SHELL_COMMON_NODE_BINDINGS_MAC_H_
  5. #define SHELL_COMMON_NODE_BINDINGS_MAC_H_
  6. #include "base/compiler_specific.h"
  7. #include "shell/common/node_bindings.h"
  8. namespace electron {
  9. class NodeBindingsMac : public NodeBindings {
  10. public:
  11. explicit NodeBindingsMac(BrowserEnvironment browser_env);
  12. ~NodeBindingsMac() override;
  13. void PrepareMessageLoop() override;
  14. void RunMessageLoop() override;
  15. private:
  16. // Called when uv's watcher queue changes.
  17. static void OnWatcherQueueChanged(uv_loop_t* loop);
  18. void PollEvents() override;
  19. // uv's backend fd.
  20. int handle_ = -1;
  21. DISALLOW_COPY_AND_ASSIGN(NodeBindingsMac);
  22. };
  23. } // namespace electron
  24. #endif // SHELL_COMMON_NODE_BINDINGS_MAC_H_