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

Side by Side Diff: Source/devtools/front_end/devices/DevicesView.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/console/ConsoleViewMessage.js ('k') | Source/devtools/front_end/documentation/DocumentationView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698