| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_DEBUGGER_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DEBUGGER_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DEBUGGER_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DEBUGGER_API_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 bool InitClientHost(); | 34 bool InitClientHost(); |
| 35 | 35 |
| 36 content::WebContents* contents_; | 36 content::WebContents* contents_; |
| 37 int tab_id_; | 37 int tab_id_; |
| 38 ExtensionDevToolsClientHost* client_host_; | 38 ExtensionDevToolsClientHost* client_host_; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // Implements the debugger.attach() extension function. | 41 // Implements the debugger.attach() extension function. |
| 42 class AttachDebuggerFunction : public DebuggerFunction { | 42 class AttachDebuggerFunction : public DebuggerFunction { |
| 43 public: | 43 public: |
| 44 DECLARE_EXTENSION_FUNCTION_NAME("debugger.attach") |
| 45 |
| 44 AttachDebuggerFunction(); | 46 AttachDebuggerFunction(); |
| 47 |
| 48 protected: |
| 45 virtual ~AttachDebuggerFunction(); | 49 virtual ~AttachDebuggerFunction(); |
| 50 |
| 51 // ExtensionFunction: |
| 46 virtual bool RunImpl() OVERRIDE; | 52 virtual bool RunImpl() OVERRIDE; |
| 47 DECLARE_EXTENSION_FUNCTION_NAME("debugger.attach") | |
| 48 }; | 53 }; |
| 49 | 54 |
| 50 // Implements the debugger.detach() extension function. | 55 // Implements the debugger.detach() extension function. |
| 51 class DetachDebuggerFunction : public DebuggerFunction { | 56 class DetachDebuggerFunction : public DebuggerFunction { |
| 52 public: | 57 public: |
| 58 DECLARE_EXTENSION_FUNCTION_NAME("debugger.detach") |
| 59 |
| 53 DetachDebuggerFunction(); | 60 DetachDebuggerFunction(); |
| 61 |
| 62 protected: |
| 54 virtual ~DetachDebuggerFunction(); | 63 virtual ~DetachDebuggerFunction(); |
| 64 |
| 65 // ExtensionFunction: |
| 55 virtual bool RunImpl() OVERRIDE; | 66 virtual bool RunImpl() OVERRIDE; |
| 56 DECLARE_EXTENSION_FUNCTION_NAME("debugger.detach") | |
| 57 }; | 67 }; |
| 58 | 68 |
| 59 // Implements the debugger.sendCommand() extension function. | 69 // Implements the debugger.sendCommand() extension function. |
| 60 class SendCommandDebuggerFunction : public DebuggerFunction { | 70 class SendCommandDebuggerFunction : public DebuggerFunction { |
| 61 public: | 71 public: |
| 72 DECLARE_EXTENSION_FUNCTION_NAME("debugger.sendCommand") |
| 73 |
| 62 SendCommandDebuggerFunction(); | 74 SendCommandDebuggerFunction(); |
| 75 void SendResponseBody(base::DictionaryValue* dictionary); |
| 76 |
| 77 protected: |
| 63 virtual ~SendCommandDebuggerFunction(); | 78 virtual ~SendCommandDebuggerFunction(); |
| 79 |
| 80 // ExtensionFunction: |
| 64 virtual bool RunImpl() OVERRIDE; | 81 virtual bool RunImpl() OVERRIDE; |
| 65 | |
| 66 void SendResponseBody(base::DictionaryValue* dictionary); | |
| 67 DECLARE_EXTENSION_FUNCTION_NAME("debugger.sendCommand") | |
| 68 }; | 82 }; |
| 69 | 83 |
| 70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DEBUGGER_API_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DEBUGGER_API_H_ |
| OLD | NEW |