| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {WebInspector.VBox} | 9 * @extends {WebInspector.VBox} |
| 10 */ | 10 */ |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 var browsers = device.browsers.filter(function(browser) { return bro
wser.adbBrowserChromeVersion; }); | 140 var browsers = device.browsers.filter(function(browser) { return bro
wser.adbBrowserChromeVersion; }); |
| 141 | 141 |
| 142 var newBrowserIds = browsers.map(function(browser) { return browser.
id }); | 142 var newBrowserIds = browsers.map(function(browser) { return browser.
id }); |
| 143 Array.prototype.forEach.call(deviceSection.querySelectorAll(".browse
r"), removeObsolete.bind(null, newBrowserIds)); | 143 Array.prototype.forEach.call(deviceSection.querySelectorAll(".browse
r"), removeObsolete.bind(null, newBrowserIds)); |
| 144 | 144 |
| 145 for (var b = 0; b < browsers.length; b++) { | 145 for (var b = 0; b < browsers.length; b++) { |
| 146 var browser = browsers[b]; | 146 var browser = browsers[b]; |
| 147 var incompatibleVersion = browser.hasOwnProperty("compatibleVers
ion") && !browser.compatibleVersion; | 147 var incompatibleVersion = browser.hasOwnProperty("compatibleVers
ion") && !browser.compatibleVersion; |
| 148 var browserSection = deviceSection.querySelector("#" + sanitizeF
orId(browser.id)); | 148 var browserSection = deviceSection.querySelector("#" + sanitizeF
orId(browser.id)); |
| 149 if (!browserSection) { | 149 if (!browserSection) { |
| 150 browserSection = document.createElementWithClass("div", "bro
wser"); | 150 browserSection = createElementWithClass("div", "browser"); |
| 151 browserSection.id = sanitizeForId(browser.id); | 151 browserSection.id = sanitizeForId(browser.id); |
| 152 insertChildSortedById(deviceSection, browserSection); | 152 insertChildSortedById(deviceSection, browserSection); |
| 153 | 153 |
| 154 var browserName = browserSection.createChild("div", "browser
-name"); | 154 var browserName = browserSection.createChild("div", "browser
-name"); |
| 155 browserName.textContent = browser.adbBrowserName; | 155 browserName.textContent = browser.adbBrowserName; |
| 156 if (browser.adbBrowserVersion) | 156 if (browser.adbBrowserVersion) |
| 157 browserName.textContent += " (" + browser.adbBrowserVers
ion + ")"; | 157 browserName.textContent += " (" + browser.adbBrowserVers
ion + ")"; |
| 158 | 158 |
| 159 if (incompatibleVersion || browser.adbBrowserChromeVersion <
WebInspector.DevicesView.MinVersionNewTab) { | 159 if (incompatibleVersion || browser.adbBrowserChromeVersion <
WebInspector.DevicesView.MinVersionNewTab) { |
| 160 var warningSection = browserSection.createChild("div", "
warning"); | 160 var warningSection = browserSection.createChild("div", "
warning"); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 178 InspectorFrontendHost.setDevicesUpdatesEnabled(false); | 178 InspectorFrontendHost.setDevicesUpdatesEnabled(false); |
| 179 }, | 179 }, |
| 180 | 180 |
| 181 wasShown: function() | 181 wasShown: function() |
| 182 { | 182 { |
| 183 InspectorFrontendHost.setDevicesUpdatesEnabled(true); | 183 InspectorFrontendHost.setDevicesUpdatesEnabled(true); |
| 184 }, | 184 }, |
| 185 | 185 |
| 186 __proto__: WebInspector.VBox.prototype | 186 __proto__: WebInspector.VBox.prototype |
| 187 }; | 187 }; |
| OLD | NEW |