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

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

Issue 23735004: chrome://inspect: Fix 'inspect' link for local targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | 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 7663ed68f96e0f01a65afbc63c9d97eb9b78b2b3..0981ae629327cbc93535138954e13dce345e43a4 100644
--- a/chrome/browser/resources/inspect/inspect.js
+++ b/chrome/browser/resources/inspect/inspect.js
@@ -278,12 +278,10 @@ function populateDeviceLists(devices) {
pageList.textContent = '';
for (var p = 0; p < browser.pages.length; p++) {
var page = browser.pages[p];
- // Attached targets have no unique id until Chrome 26.
- // For such targets it is impossible:
- // - to issue 'close' command,
- // - to activate existing DevTools window.
- page.hasUniqueId = !page.attached ||
- majorChromeVersion >= MIN_VERSION_TARGET_ID;
+ // Attached targets have no unique id until Chrome 26. For such targets
+ // it is impossible to activate existing DevTools window.
+ page.hasNoUniqueId = page.attached &&
+ majorChromeVersion < MIN_VERSION_TARGET_ID;
var row = addTargetToList(
page, pageList, ['faviconUrl', 'name', 'url', 'description']);
if (isChrome) {
@@ -295,9 +293,7 @@ function populateDeviceLists(devices) {
'reload', reload.bind(null, page), page.attached));
if (majorChromeVersion >= MIN_VERSION_TAB_CLOSE) {
row.appendChild(createActionLink(
- 'close',
- terminate.bind(null, page),
- page.attached || !page.hasUniqueId));
+ 'close', terminate.bind(null, page), page.attached));
}
}
}
@@ -402,7 +398,7 @@ function addTargetToList(data, list, properties) {
addWebViewDescription(description, row);
row.appendChild(createActionLink(
- 'inspect', inspect.bind(null, data), !data.hasUniqueId));
+ 'inspect', inspect.bind(null, data), data.hasNoUniqueId));
list.appendChild(row);
return row;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698