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 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "chrome/browser/extensions/extension_function.h" | 13 #include "chrome/browser/extensions/extension_function.h" |
14 | 14 |
15 // Base debugger function. | 15 // Base debugger function. |
16 | 16 |
17 class ExtensionDevToolsClientHost; | 17 class ExtensionDevToolsClientHost; |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class DictionaryValue; | 20 class DictionaryValue; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 class WebContents; | 24 class WebContents; |
25 } | 25 } |
26 | 26 |
| 27 namespace extensions { |
| 28 namespace api { |
| 29 namespace debugger { |
| 30 namespace SendCommand { |
| 31 namespace Results { |
| 32 struct Result; |
| 33 } |
| 34 } |
| 35 } |
| 36 } |
| 37 } |
| 38 |
27 class DebuggerFunction : public AsyncExtensionFunction { | 39 class DebuggerFunction : public AsyncExtensionFunction { |
28 protected: | 40 protected: |
29 DebuggerFunction(); | 41 DebuggerFunction(); |
30 virtual ~DebuggerFunction() {} | 42 virtual ~DebuggerFunction() {} |
31 | 43 |
32 bool InitTabContents(); | 44 bool InitTabContents(); |
33 bool InitClientHost(); | 45 bool InitClientHost(); |
34 | 46 |
35 content::WebContents* contents_; | 47 content::WebContents* contents_; |
36 int tab_id_; | 48 int tab_id_; |
(...skipping 27 matching lines...) Expand all Loading... |
64 // ExtensionFunction: | 76 // ExtensionFunction: |
65 virtual bool RunImpl() OVERRIDE; | 77 virtual bool RunImpl() OVERRIDE; |
66 }; | 78 }; |
67 | 79 |
68 // Implements the debugger.sendCommand() extension function. | 80 // Implements the debugger.sendCommand() extension function. |
69 class SendCommandDebuggerFunction : public DebuggerFunction { | 81 class SendCommandDebuggerFunction : public DebuggerFunction { |
70 public: | 82 public: |
71 DECLARE_EXTENSION_FUNCTION_NAME("debugger.sendCommand") | 83 DECLARE_EXTENSION_FUNCTION_NAME("debugger.sendCommand") |
72 | 84 |
73 SendCommandDebuggerFunction(); | 85 SendCommandDebuggerFunction(); |
74 void SendResponseBody(base::DictionaryValue* dictionary); | 86 void SendResponseBody( |
| 87 const extensions::api::debugger::SendCommand::Results::Result& result); |
75 | 88 |
76 protected: | 89 protected: |
77 virtual ~SendCommandDebuggerFunction(); | 90 virtual ~SendCommandDebuggerFunction(); |
78 | 91 |
79 // ExtensionFunction: | 92 // ExtensionFunction: |
80 virtual bool RunImpl() OVERRIDE; | 93 virtual bool RunImpl() OVERRIDE; |
81 }; | 94 }; |
82 | 95 |
83 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 96 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
OLD | NEW |