| OLD | NEW |
| 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 | 9 |
| 10 var queryParamsObject = {}; | 10 var queryParamsObject = {}; |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 if (majorChromeVersion >= MIN_VERSION_TAB_ACTIVATE) { | 372 if (majorChromeVersion >= MIN_VERSION_TAB_ACTIVATE) { |
| 373 addActionLink(row, 'focus tab', | 373 addActionLink(row, 'focus tab', |
| 374 sendTargetCommand.bind(null, 'activate', page), false); | 374 sendTargetCommand.bind(null, 'activate', page), false); |
| 375 } | 375 } |
| 376 if (majorChromeVersion) { | 376 if (majorChromeVersion) { |
| 377 addActionLink(row, 'reload', | 377 addActionLink(row, 'reload', |
| 378 sendTargetCommand.bind(null, 'reload', page), page.attached); | 378 sendTargetCommand.bind(null, 'reload', page), page.attached); |
| 379 } | 379 } |
| 380 if (majorChromeVersion >= MIN_VERSION_TAB_CLOSE) { | 380 if (majorChromeVersion >= MIN_VERSION_TAB_CLOSE) { |
| 381 addActionLink(row, 'close', | 381 addActionLink(row, 'close', |
| 382 sendTargetCommand.bind(null, 'close', page), page.attached); | 382 sendTargetCommand.bind(null, 'close', page), false); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 | 388 |
| 389 function addToPagesList(data) { | 389 function addToPagesList(data) { |
| 390 var row = addTargetToList(data, $('pages-list'), ['name', 'url']); | 390 var row = addTargetToList(data, $('pages-list'), ['name', 'url']); |
| 391 addFavicon(row, data); | 391 addFavicon(row, data); |
| 392 if (data.guests) | 392 if (data.guests) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 412 var guestRow = addTargetToList(guest, row, ['name', 'url']); | 412 var guestRow = addTargetToList(guest, row, ['name', 'url']); |
| 413 guestRow.classList.add('guest'); | 413 guestRow.classList.add('guest'); |
| 414 addFavicon(guestRow, guest); | 414 addFavicon(guestRow, guest); |
| 415 }); | 415 }); |
| 416 } | 416 } |
| 417 | 417 |
| 418 function addToWorkersList(data) { | 418 function addToWorkersList(data) { |
| 419 var row = | 419 var row = |
| 420 addTargetToList(data, $('workers-list'), ['name', 'description', 'url']); | 420 addTargetToList(data, $('workers-list'), ['name', 'description', 'url']); |
| 421 addActionLink(row, 'terminate', | 421 addActionLink(row, 'terminate', |
| 422 sendTargetCommand.bind(null, 'close', data), data.attached); | 422 sendTargetCommand.bind(null, 'close', data), false); |
| 423 } | 423 } |
| 424 | 424 |
| 425 function addToOthersList(data) { | 425 function addToOthersList(data) { |
| 426 addTargetToList(data, $('others-list'), ['url']); | 426 addTargetToList(data, $('others-list'), ['url']); |
| 427 } | 427 } |
| 428 | 428 |
| 429 function formatValue(data, property) { | 429 function formatValue(data, property) { |
| 430 var value = data[property]; | 430 var value = data[property]; |
| 431 | 431 |
| 432 if (property == 'name' && value == '') { | 432 if (property == 'name' && value == '') { |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 deviceSection.querySelector('.device-ports').textContent = ''; | 926 deviceSection.querySelector('.device-ports').textContent = ''; |
| 927 } | 927 } |
| 928 | 928 |
| 929 Array.prototype.forEach.call( | 929 Array.prototype.forEach.call( |
| 930 document.querySelectorAll('.device'), clearPorts); | 930 document.querySelectorAll('.device'), clearPorts); |
| 931 } | 931 } |
| 932 | 932 |
| 933 document.addEventListener('DOMContentLoaded', onload); | 933 document.addEventListener('DOMContentLoaded', onload); |
| 934 | 934 |
| 935 window.addEventListener('hashchange', onHashChange); | 935 window.addEventListener('hashchange', onHashChange); |
| OLD | NEW |