OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Defines the Chrome Extensions Debugger API functions for attaching debugger | 5 // Defines the Chrome Extensions Debugger API functions for attaching debugger |
6 // to the page. | 6 // to the page. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class DebuggerAttachFunction : public DebuggerFunction { | 49 class DebuggerAttachFunction : public DebuggerFunction { |
50 public: | 50 public: |
51 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH) | 51 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH) |
52 | 52 |
53 DebuggerAttachFunction(); | 53 DebuggerAttachFunction(); |
54 | 54 |
55 protected: | 55 protected: |
56 virtual ~DebuggerAttachFunction(); | 56 virtual ~DebuggerAttachFunction(); |
57 | 57 |
58 // ExtensionFunction: | 58 // ExtensionFunction: |
59 virtual bool RunImpl() OVERRIDE; | 59 virtual bool RunAsync() OVERRIDE; |
60 }; | 60 }; |
61 | 61 |
62 // Implements the debugger.detach() extension function. | 62 // Implements the debugger.detach() extension function. |
63 class DebuggerDetachFunction : public DebuggerFunction { | 63 class DebuggerDetachFunction : public DebuggerFunction { |
64 public: | 64 public: |
65 DECLARE_EXTENSION_FUNCTION("debugger.detach", DEBUGGER_DETACH) | 65 DECLARE_EXTENSION_FUNCTION("debugger.detach", DEBUGGER_DETACH) |
66 | 66 |
67 DebuggerDetachFunction(); | 67 DebuggerDetachFunction(); |
68 | 68 |
69 protected: | 69 protected: |
70 virtual ~DebuggerDetachFunction(); | 70 virtual ~DebuggerDetachFunction(); |
71 | 71 |
72 // ExtensionFunction: | 72 // ExtensionFunction: |
73 virtual bool RunImpl() OVERRIDE; | 73 virtual bool RunAsync() OVERRIDE; |
74 }; | 74 }; |
75 | 75 |
76 // Implements the debugger.sendCommand() extension function. | 76 // Implements the debugger.sendCommand() extension function. |
77 class DebuggerSendCommandFunction : public DebuggerFunction { | 77 class DebuggerSendCommandFunction : public DebuggerFunction { |
78 public: | 78 public: |
79 DECLARE_EXTENSION_FUNCTION("debugger.sendCommand", DEBUGGER_SENDCOMMAND) | 79 DECLARE_EXTENSION_FUNCTION("debugger.sendCommand", DEBUGGER_SENDCOMMAND) |
80 | 80 |
81 DebuggerSendCommandFunction(); | 81 DebuggerSendCommandFunction(); |
82 void SendResponseBody(base::DictionaryValue* result); | 82 void SendResponseBody(base::DictionaryValue* result); |
83 | 83 |
84 protected: | 84 protected: |
85 virtual ~DebuggerSendCommandFunction(); | 85 virtual ~DebuggerSendCommandFunction(); |
86 | 86 |
87 // ExtensionFunction: | 87 // ExtensionFunction: |
88 virtual bool RunImpl() OVERRIDE; | 88 virtual bool RunAsync() OVERRIDE; |
89 }; | 89 }; |
90 | 90 |
91 // Implements the debugger.getTargets() extension function. | 91 // Implements the debugger.getTargets() extension function. |
92 class DebuggerGetTargetsFunction : public DebuggerFunction { | 92 class DebuggerGetTargetsFunction : public DebuggerFunction { |
93 public: | 93 public: |
94 DECLARE_EXTENSION_FUNCTION("debugger.getTargets", DEBUGGER_ATTACH) | 94 DECLARE_EXTENSION_FUNCTION("debugger.getTargets", DEBUGGER_ATTACH) |
95 | 95 |
96 DebuggerGetTargetsFunction(); | 96 DebuggerGetTargetsFunction(); |
97 | 97 |
98 protected: | 98 protected: |
99 virtual ~DebuggerGetTargetsFunction(); | 99 virtual ~DebuggerGetTargetsFunction(); |
100 | 100 |
101 // ExtensionFunction: | 101 // ExtensionFunction: |
102 virtual bool RunImpl() OVERRIDE; | 102 virtual bool RunAsync() OVERRIDE; |
103 | 103 |
104 private: | 104 private: |
105 void SendTargetList(const std::vector<DevToolsTargetImpl*>& target_list); | 105 void SendTargetList(const std::vector<DevToolsTargetImpl*>& target_list); |
106 }; | 106 }; |
107 | 107 |
108 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 108 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
OLD | NEW |