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

Unified Diff: chrome/common/extensions/api/debugger.json

Issue 12377047: Add chrome.debugger.getTargets method to discover available debug targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@targets
Patch Set: Removed flaky tests Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/debugger.json
diff --git a/chrome/common/extensions/api/debugger.json b/chrome/common/extensions/api/debugger.json
index 24c5d15d3424c9a8be712bad03c05d821210c2ff..ad8c8ade52129574bcd2491ca7edbac2ec27eb26 100644
--- a/chrome/common/extensions/api/debugger.json
+++ b/chrome/common/extensions/api/debugger.json
@@ -12,7 +12,25 @@
"description": "Debuggee identifier. Either tabId or extensionId must be specified",
"properties": {
"tabId": { "type": "integer", "optional": true, "description": "The id of the tab which you intend to debug." },
- "extensionId": { "type": "string", "optional": true, "description": "The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'enable-silent-debugging' flag is enabled on the target browser." }
+ "extensionId": { "type": "string", "optional": true, "description": "The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'enable-silent-debugging' flag is enabled on the target browser." },
+ "targetId": { "type": "string", "optional": true, "description": "The opaque id of the debug target." }
+ }
+ },
+ {
+ "id": "TargetInfo",
+ "type": "object",
+ "description": "Debug target information",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Target type.",
+ "enum" : ["page", "background_page", "other" ]
+ },
+ "id": { "type": "string", "description": "Target id." },
+ "attached": { "type": "boolean", "description": "True if debugger is already attached." },
+ "title": { "type": "string", "description": "Target page title." },
+ "url": { "type": "string", "description": "Target URL." },
+ "faviconUrl": { "type": "string", "optional": true, "description": "Target favicon URL." }
}
}
],
@@ -98,6 +116,25 @@
"description": "Response body. If an error occurs while posting the message, the callback will be called with no arguments and $ref:runtime.lastError will be set to the error message."
}
]
+ },
+ {
+ "name": "getTargets",
+ "type": "function",
+ "description": "Returns the list of available debug targets.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "type": "array",
+ "name": "result",
+ "items": {"$ref": "TargetInfo"},
+ "description": "Array of TargetInfo objects corresponding to the available debug targets."
+ }
+ ]
+ }
+ ]
}
],
"events": [

Powered by Google App Engine
This is Rietveld 408576698