Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: chrome/browser/extensions/api/debugger/debugger_api.h

Issue 12304021: Allow chrome.debugger API to attach to extension background pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 std::string GetTargetTypeString();
37 std::string GetTargetIdString();
38
36 content::WebContents* contents_; 39 content::WebContents* contents_;
37 int tab_id_; 40 int debuggee_tab_id_;
41 std::string debuggee_extension_id_;
38 ExtensionDevToolsClientHost* client_host_; 42 ExtensionDevToolsClientHost* client_host_;
39 }; 43 };
40 44
41 // Implements the debugger.attach() extension function. 45 // Implements the debugger.attach() extension function.
42 class DebuggerAttachFunction : public DebuggerFunction { 46 class DebuggerAttachFunction : public DebuggerFunction {
43 public: 47 public:
44 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH) 48 DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH)
45 49
46 DebuggerAttachFunction(); 50 DebuggerAttachFunction();
47 51
(...skipping 27 matching lines...) Expand all
75 void SendResponseBody(base::DictionaryValue* result); 79 void SendResponseBody(base::DictionaryValue* result);
76 80
77 protected: 81 protected:
78 virtual ~DebuggerSendCommandFunction(); 82 virtual ~DebuggerSendCommandFunction();
79 83
80 // ExtensionFunction: 84 // ExtensionFunction:
81 virtual bool RunImpl() OVERRIDE; 85 virtual bool RunImpl() OVERRIDE;
82 }; 86 };
83 87
84 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ 88 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698