node_bindings_linux.h 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2014 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 ATOM_COMMON_NODE_BINDINGS_LINUX_H_
  5. #define ATOM_COMMON_NODE_BINDINGS_LINUX_H_
  6. #include "atom/common/node_bindings.h"
  7. #include "base/compiler_specific.h"
  8. namespace atom {
  9. class NodeBindingsLinux : public NodeBindings {
  10. public:
  11. explicit NodeBindingsLinux(BrowserEnvironment browser_env);
  12. ~NodeBindingsLinux() override;
  13. void RunMessageLoop() override;
  14. private:
  15. // Called when uv's watcher queue changes.
  16. static void OnWatcherQueueChanged(uv_loop_t* loop);
  17. void PollEvents() override;
  18. // Epoll to poll for uv's backend fd.
  19. int epoll_;
  20. DISALLOW_COPY_AND_ASSIGN(NodeBindingsLinux);
  21. };
  22. } // namespace atom
  23. #endif // ATOM_COMMON_NODE_BINDINGS_LINUX_H_