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

Side by Side Diff: chrome/browser/resources/inspect/inspect.js

Issue 2909503003: WebUI: Enable ESLint rule for missing semicolons. (Closed)
Patch Set: Undo local_ntp changes from this CL. Created 3 years, 6 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 var MIN_VERSION_TAB_CLOSE = 25; 5 var MIN_VERSION_TAB_CLOSE = 25;
6 var MIN_VERSION_TARGET_ID = 26; 6 var MIN_VERSION_TARGET_ID = 26;
7 var MIN_VERSION_NEW_TAB = 29; 7 var MIN_VERSION_NEW_TAB = 29;
8 var MIN_VERSION_TAB_ACTIVATE = 30; 8 var MIN_VERSION_TAB_ACTIVATE = 30;
9 var WEBRTC_SERIAL = 'WEBRTC'; 9 var WEBRTC_SERIAL = 'WEBRTC';
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 var deviceList = $('devices-list'); 219 var deviceList = $('devices-list');
220 if (alreadyDisplayed(deviceList, devices)) 220 if (alreadyDisplayed(deviceList, devices))
221 return; 221 return;
222 222
223 function removeObsolete(validIds, section) { 223 function removeObsolete(validIds, section) {
224 if (validIds.indexOf(section.id) < 0) 224 if (validIds.indexOf(section.id) < 0)
225 section.remove(); 225 section.remove();
226 } 226 }
227 227
228 var newDeviceIds = devices.map(function(d) { return d.id }); 228 var newDeviceIds = devices.map(function(d) { return d.id; });
229 Array.prototype.forEach.call( 229 Array.prototype.forEach.call(
230 deviceList.querySelectorAll('.device'), 230 deviceList.querySelectorAll('.device'),
231 removeObsolete.bind(null, newDeviceIds)); 231 removeObsolete.bind(null, newDeviceIds));
232 232
233 $('devices-help').hidden = !!devices.length; 233 $('devices-help').hidden = !!devices.length;
234 234
235 for (var d = 0; d < devices.length; d++) { 235 for (var d = 0; d < devices.length; d++) {
236 var device = devices[d]; 236 var device = devices[d];
237 237
238 var deviceSection = $(device.id); 238 var deviceSection = $(device.id);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (alreadyDisplayed(deviceSection, device)) 275 if (alreadyDisplayed(deviceSection, device))
276 continue; 276 continue;
277 277
278 deviceSection.querySelector('.device-name').textContent = device.adbModel; 278 deviceSection.querySelector('.device-name').textContent = device.adbModel;
279 deviceSection.querySelector('.device-auth').textContent = 279 deviceSection.querySelector('.device-auth').textContent =
280 device.adbConnected ? '' : 'Pending authentication: please accept ' + 280 device.adbConnected ? '' : 'Pending authentication: please accept ' +
281 'debugging session on the device.'; 281 'debugging session on the device.';
282 282
283 var browserList = deviceSection.querySelector('.browsers'); 283 var browserList = deviceSection.querySelector('.browsers');
284 var newBrowserIds = 284 var newBrowserIds =
285 device.browsers.map(function(b) { return b.id }); 285 device.browsers.map(function(b) { return b.id; });
286 Array.prototype.forEach.call( 286 Array.prototype.forEach.call(
287 browserList.querySelectorAll('.browser'), 287 browserList.querySelectorAll('.browser'),
288 removeObsolete.bind(null, newBrowserIds)); 288 removeObsolete.bind(null, newBrowserIds));
289 289
290 for (var b = 0; b < device.browsers.length; b++) { 290 for (var b = 0; b < device.browsers.length; b++) {
291 var browser = device.browsers[b]; 291 var browser = device.browsers[b];
292 var majorChromeVersion = browser.adbBrowserChromeVersion; 292 var majorChromeVersion = browser.adbBrowserChromeVersion;
293 var pageList; 293 var pageList;
294 var browserSection = $(browser.id); 294 var browserSection = $(browser.id);
295 if (browserSection) { 295 if (browserSection) {
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 Array.prototype.forEach.call( 1021 Array.prototype.forEach.call(
1022 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); 1022 deviceSection.querySelectorAll('.browser'), clearBrowserPorts);
1023 } 1023 }
1024 1024
1025 Array.prototype.forEach.call( 1025 Array.prototype.forEach.call(
1026 document.querySelectorAll('.device'), clearPorts); 1026 document.querySelectorAll('.device'), clearPorts);
1027 } 1027 }
1028 1028
1029 document.addEventListener('DOMContentLoaded', onload); 1029 document.addEventListener('DOMContentLoaded', onload);
1030 window.addEventListener('hashchange', onHashChange); 1030 window.addEventListener('hashchange', onHashChange);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698