blob: 1e4a5f42e4c073c7412e53e8ce5f785d20ab01cf (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_
#define CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_
#include <string>
#include "base/basictypes.h"
#include "base/ref_counted.h"
class DebuggerShell;
class DebuggerInputOutput
    : public base::RefCountedThreadSafe<DebuggerInputOutput> {
public:
  DebuggerInputOutput() {}
  virtual ~DebuggerInputOutput() {}
  // Called when Debugger is ready to begin.
  virtual void Start(DebuggerShell* debugger) { debugger_ = debugger; }
  // Called when Debugger is shutting down
  virtual void Stop() {}
  // Outputs a string to the connection.
  virtual void Output(const std::string& out) = 0;
  virtual void Output(const std::wstring& out) = 0;
  virtual void OutputLine(const std::string& out) = 0;
  virtual void OutputLine(const std::wstring& out) = 0;
  virtual void OutputPrompt(const std::string& prompt) = 0;
  virtual void OutputPrompt(const std::wstring& prompt) = 0;
  // called by debugger debugger - ready is false when a command has just been
  // entered and true when a response to that command has been received
  virtual void SetDebuggerReady(bool ready) {}
  // called by debugger debugger - brk is false when the web page being debugged
  // is running, and true when the page is stopped at a breakpoint
  virtual void SetDebuggerBreak(bool brk) {}
protected:
  DebuggerShell* debugger_;
private:
  DISALLOW_COPY_AND_ASSIGN(DebuggerInputOutput);
};
#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_
 |