3bbea9f9dd0a315a32880f87da5e3d5c7c5a1cbc
[platform/framework/web/crosswalk-tizen.git] / atom / common / node_bindings_linux.h
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
5 #ifndef ATOM_COMMON_NODE_BINDINGS_LINUX_H_
6 #define ATOM_COMMON_NODE_BINDINGS_LINUX_H_
7
8 #include "base/compiler_specific.h"
9 #include "atom/common/node_bindings.h"
10
11 namespace atom {
12
13 class NodeBindingsLinux : public NodeBindings {
14  public:
15   explicit NodeBindingsLinux(bool is_browser);
16   virtual ~NodeBindingsLinux();
17
18   void RunMessageLoop() override;
19
20  private:
21   // Called when uv's watcher queue changes.
22   static void OnWatcherQueueChanged(uv_loop_t* loop);
23
24   void PollEvents() override;
25
26   // Epoll to poll for uv's backend fd.
27   int epoll_;
28
29   DISALLOW_COPY_AND_ASSIGN(NodeBindingsLinux);
30 };
31
32 }  // namespace atom
33
34 #endif  // ATOM_COMMON_NODE_BINDINGS_LINUX_H_