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

Unified Diff: chrome/browser/resources/inspect/inspect.js

Issue 12559008: DevTools: add backend for discovering connected ADB devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Offline review comments addressed 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
« no previous file with comments | « chrome/browser/devtools/protocol_http_request.cc ('k') | chrome/browser/ui/webui/inspect_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/inspect/inspect.js
diff --git a/chrome/browser/resources/inspect/inspect.js b/chrome/browser/resources/inspect/inspect.js
index 3f05a2dc11e1fdcdcb965a200e1ec3242c34ce3d..7e439e0fa54b3fe589e74667bacf770408fe964a 100644
--- a/chrome/browser/resources/inspect/inspect.js
+++ b/chrome/browser/resources/inspect/inspect.js
@@ -11,6 +11,24 @@ function requestData() {
return [];
}
+function adbQuery(query) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'adb-query/' + query, false);
+ xhr.send(null);
+ if (xhr.status === 200)
+ return JSON.parse(xhr.responseText);
+ return [String(xhr.status), ''];
+}
+
+function xhr(url) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'local-xhr/' + url, false);
+ xhr.send(null);
+ if (xhr.status === 200)
+ return JSON.parse(xhr.responseText);
+ return [String(xhr.status), ''];
+}
+
function inspect(data) {
chrome.send('inspect',
[String(data.processId), String(data.routeId)]);
« no previous file with comments | « chrome/browser/devtools/protocol_http_request.cc ('k') | chrome/browser/ui/webui/inspect_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698