electron/atom/browser/node_debugger.h

40 lines
862 B
C
Raw Normal View History

2014-08-19 15:36:26 +00:00
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_NODE_DEBUGGER_H_
#define ATOM_BROWSER_NODE_DEBUGGER_H_
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
namespace net {
class StreamSocket;
class TCPServerSocket;
}
2014-08-19 15:36:26 +00:00
namespace atom {
// Add support for node's "--debug" switch.
class NodeDebugger {
public:
NodeDebugger();
virtual ~NodeDebugger();
private:
void DoAcceptLoop();
base::Thread thread_;
scoped_ptr<net::TCPServerSocket> server_socket_;
scoped_ptr<net::StreamSocket> accepted_socket_;
2014-08-19 15:36:26 +00:00
base::WeakPtrFactory<NodeDebugger> weak_factory_;
2014-08-19 15:36:26 +00:00
DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
};
} // namespace atom
#endif // ATOM_BROWSER_NODE_DEBUGGER_H_