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 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 class DebuggerFunction : public AsyncExtensionFunction { | 28 class DebuggerFunction : public AsyncExtensionFunction { |
29 protected: | 29 protected: |
30 DebuggerFunction(); | 30 DebuggerFunction(); |
31 virtual ~DebuggerFunction() {} | 31 virtual ~DebuggerFunction() {} |
32 | 32 |
33 bool InitWebContents(); | 33 bool InitWebContents(); |
34 bool InitClientHost(); | 34 bool InitClientHost(); |
35 | 35 |
| 36 void FormatErrorMessage(const std::string& format); |
| 37 |
36 content::WebContents* contents_; | 38 content::WebContents* contents_; |
37 int tab_id_; | 39 int debuggee_tab_id_; |
| 40 std::string debuggee_extension_id_; |
38 ExtensionDevToolsClientHost* client_host_; | 41 ExtensionDevToolsClientHost* client_host_; |
39 }; | 42 }; |
40 | 43 |
41 // Implements the debugger.attach() extension function. | 44 // Implements the debugger.attach() extension function. |
42 class DebuggerAttachFunction : public DebuggerFunction { | 45 class DebuggerAttachFunction : public DebuggerFunction { |
43 public: | 46 public: |
44 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH) | 47 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH) |
45 | 48 |
46 DebuggerAttachFunction(); | 49 DebuggerAttachFunction(); |
47 | 50 |
(...skipping 27 matching lines...) Expand all Loading... |
75 void SendResponseBody(base::DictionaryValue* result); | 78 void SendResponseBody(base::DictionaryValue* result); |
76 | 79 |
77 protected: | 80 protected: |
78 virtual ~DebuggerSendCommandFunction(); | 81 virtual ~DebuggerSendCommandFunction(); |
79 | 82 |
80 // ExtensionFunction: | 83 // ExtensionFunction: |
81 virtual bool RunImpl() OVERRIDE; | 84 virtual bool RunImpl() OVERRIDE; |
82 }; | 85 }; |
83 | 86 |
84 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 87 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
OLD | NEW |