Add support for --debug switch.
[platform/framework/web/crosswalk-tizen.git] / atom / browser / node_debugger.h
1 // Copyright (c) 2014 GitHub, Inc. All rights reserved.
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_BROWSER_NODE_DEBUGGER_H_
6 #define ATOM_BROWSER_NODE_DEBUGGER_H_
7
8 #include "base/basictypes.h"
9 #include "vendor/node/deps/uv/include/uv.h"
10
11 namespace atom {
12
13 // Add support for node's "--debug" switch.
14 class NodeDebugger {
15  public:
16   NodeDebugger();
17   virtual ~NodeDebugger();
18
19  private:
20   static void DispatchDebugMessagesInMainThread(uv_async_t* handle);
21   static void DispatchDebugMessagesInMsgThread();
22
23   static uv_async_t dispatch_debug_messages_async_;
24
25   DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
26 };
27
28 }  // namespace atom
29
30 #endif  // ATOM_BROWSER_NODE_DEBUGGER_H_