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

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

Issue 26436003: DevTools: display 'Pending authentication' message upon raw usb debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment addressed. Created 7 years, 2 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/port_forwarding_controller.cc ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('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 19ac701f97cc87ac030ddb01eae667533bb354d0..bd1e769b0b591d784f92ed644cbb17df9aa475a4 100644
--- a/chrome/browser/resources/inspect/inspect.js
+++ b/chrome/browser/resources/inspect/inspect.js
@@ -135,13 +135,8 @@ function populateDeviceLists(devices) {
for (var d = 0; d < devices.length; d++) {
var device = devices[d];
- var devicePorts;
- var browserList;
var deviceSection = $(device.adbGlobalId);
- if (deviceSection) {
- devicePorts = deviceSection.querySelector('.device-ports');
- browserList = deviceSection.querySelector('.browsers');
- } else {
+ if (!deviceSection) {
deviceSection = document.createElement('div');
deviceSection.id = device.adbGlobalId;
deviceSection.className = 'device';
@@ -153,7 +148,6 @@ function populateDeviceLists(devices) {
var deviceName = document.createElement('div');
deviceName.className = 'device-name';
- deviceName.textContent = device.adbModel;
deviceHeader.appendChild(deviceName);
if (device.adbSerial) {
@@ -163,18 +157,28 @@ function populateDeviceLists(devices) {
deviceHeader.appendChild(deviceSerial);
}
- devicePorts = document.createElement('div');
+ var devicePorts = document.createElement('div');
devicePorts.className = 'device-ports';
deviceHeader.appendChild(devicePorts);
- browserList = document.createElement('div');
+ var browserList = document.createElement('div');
browserList.className = 'browsers';
deviceSection.appendChild(browserList);
+
+ var authenticating = document.createElement('div');
+ authenticating.className = 'device-auth';
+ deviceSection.appendChild(authenticating);
}
if (alreadyDisplayed(deviceSection, device))
continue;
+ deviceSection.querySelector('.device-name').textContent = device.adbModel;
+ deviceSection.querySelector('.device-auth').textContent =
+ device.adbConnected ? '' : 'Pending authentication: please accept ' +
+ 'debugging session on the device.';
+
+ var devicePorts = deviceSection.querySelector('.device-ports');
devicePorts.textContent = '';
if (device.adbPortStatus) {
for (var port in device.adbPortStatus) {
@@ -198,6 +202,7 @@ function populateDeviceLists(devices) {
}
}
+ var browserList = deviceSection.querySelector('.browsers');
var newBrowserIds =
device.browsers.map(function(b) { return b.adbGlobalId });
Array.prototype.forEach.call(
« no previous file with comments | « chrome/browser/devtools/port_forwarding_controller.cc ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698