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

Side by Side Diff: Source/devtools/front_end/emulation/OverridesUI.js

Issue 1160323004: [DevTools] Move emulated devices to separate module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed compile Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 WebInspector.OverridesUI = {} 5 WebInspector.OverridesUI = {}
6 6
7 /** 7 /**
8 * @return {!Element} 8 * @return {!Element}
9 */ 9 */
10 WebInspector.OverridesUI.createDeviceSelect = function() 10 WebInspector.OverridesUI.createDeviceSelect = function()
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 function textChanged() 241 function textChanged()
242 { 242 {
243 if (userAgentSetting.get() !== otherUserAgentElement.value) 243 if (userAgentSetting.get() !== otherUserAgentElement.value)
244 userAgentSetting.set(otherUserAgentElement.value); 244 userAgentSetting.set(otherUserAgentElement.value);
245 } 245 }
246 246
247 return { select: userAgentSelectElement, input: otherUserAgentElement }; 247 return { select: userAgentSelectElement, input: otherUserAgentElement };
248 } 248 }
249 249
250 /** @type {!Array.<*>} */
251 WebInspector.OverridesUI._phones = [
252 {title: "Apple iPhone 4", width: 320, height: 480, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) Apple WebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5" , touch: true, mobile: true},
253 {title: "Apple iPhone 5", width: 320, height: 568, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKi t/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53", touch: true, mobile: true},
254 {title: "Apple iPhone 6", width: 375, height: 667, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1 .3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4", touch: true, mobile: true},
255 {title: "Apple iPhone 6 Plus", width: 414, height: 736, deviceScaleFactor: 3 , userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/ 600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4", touch: true, mobile: true},
256 {title: "BlackBerry Z30", width: 360, height: 640, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Versi on/10.0.9.2372 Mobile Safari/537.10+", touch: true, mobile: true},
257 {title: "Google Nexus 4", width: 384, height: 640, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (Linux; Android 4.4.4; en-us; Nexus 4 Build/JOP40D) AppleWe bKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36", touch: true, mobile: true},
258 {title: "Google Nexus 5", width: 360, height: 640, deviceScaleFactor: 3, use rAgent: "Mozilla/5.0 (Linux; Android 4.4.4; en-us; Nexus 5 Build/JOP40D) AppleWe bKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36", touch: true, mobile: true},
259 {title: "Google Nexus 6", width: 412, height: 732, deviceScaleFactor: 3.5, u serAgent: "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/ 537.36 (KHTML, like Gecko) Chrome/44.0.2403.20 Mobile Safari/537.36", touch: tru e, mobile: true},
260 {title: "LG Optimus L70", width: 384, height: 640, deviceScaleFactor: 1.25, userAgent: "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS 32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.1599.103 Mobile Safari/537.36", touch: true, mobile: true},
261 {title: "Nokia N9", width: 360, height: 640, deviceScaleFactor: 1, userAgent : "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrow ser/8.5.0 Mobile Safari/534.13", touch: true, mobile: true},
262 {title: "Nokia Lumia 520", width: 320, height: 533, deviceScaleFactor: 1.4, userAgent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)", touch: true, mobile: true},
263 {title: "Samsung Galaxy S III", width: 360, height: 640, deviceScaleFactor: 2, userAgent: "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", touch : true, mobile: true},
264 {title: "Samsung Galaxy S4", width: 360, height: 640, deviceScaleFactor: 3, userAgent: "Mozilla/5.0 (Linux; Android 4.4.2; GT-I9505 Build/JDQ39) AppleWebKit /537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36 ", touch: true, mobile: true}
265 ];
266
267 /** @type {!Array.<*>} */
268 WebInspector.OverridesUI._tablets = [
269 {title: "Amazon Kindle Fire HDX", width: 2560, height: 1600, deviceScaleFact or: 2, userAgent: "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit /535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true", touc h: true, mobile: true},
270 {title: "Apple iPad Mini", width: 1024, height: 768, deviceScaleFactor: 1, u serAgent: "Mozilla/5.0 (iPad; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533 .17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5", touch: tru e, mobile: true},
271 {title: "Apple iPad", width: 1024, height: 768, deviceScaleFactor: 2, userAg ent: "Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53", touch: true, mobile: true },
272 {title: "BlackBerry PlayBook", width: 1024, height: 600, deviceScaleFactor: 1, userAgent: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit /536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", touch: true, mobile: true},
273 {title: "Google Nexus 10", width: 1280, height: 800, deviceScaleFactor: 2, u serAgent: "Mozilla/5.0 (Linux; Android 4.3; Nexus 10 Build/JSS15Q) AppleWebKit/5 37.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Safari/537.36", touch: true, mobile : true},
274 {title: "Google Nexus 7", width: 960, height: 600, deviceScaleFactor: 2, use rAgent: "Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537. 36 (KHTML, like Gecko) Chrome/42.0.2307.2 Safari/537.36", touch: true, mobile: t rue},
275 {title: "Samsung Galaxy Note 3", width: 360, height: 640, deviceScaleFactor: 3, userAgent: "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J ) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", touc h: true, mobile: true},
276 {title: "Samsung Galaxy Note II", width: 360, height: 640, deviceScaleFactor : 2, userAgent: "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03 C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", tou ch: true, mobile: true}
277 ];
278
279 /** @type {!Array.<*>} */
280 WebInspector.OverridesUI._notebooks = [
281 {title: "Laptop with touch", width: 1280, height: 950, deviceScaleFactor: 1, userAgent: "", touch: true, mobile: false},
282 {title: "Laptop with HiDPI screen", width: 1440, height: 900, deviceScaleFac tor: 2, userAgent: "", touch: false, mobile: false},
283 {title: "Laptop with MDPI screen", width: 1280, height: 800, deviceScaleFact or: 1, userAgent: "", touch: false, mobile: false}
284 ];
285
286 /** @type {!Array.<!WebInspector.OverridesSupport.NetworkConditionsPreset>} */ 250 /** @type {!Array.<!WebInspector.OverridesSupport.NetworkConditionsPreset>} */
287 WebInspector.OverridesUI._networkConditionsPresets = [ 251 WebInspector.OverridesUI._networkConditionsPresets = [
288 {id: "offline", title: "Offline", throughput: 0, latency: 0}, 252 {id: "offline", title: "Offline", throughput: 0, latency: 0},
289 {id: "gprs", title: "GPRS", throughput: 50, latency: 500}, 253 {id: "gprs", title: "GPRS", throughput: 50, latency: 500},
290 {id: "edge", title: "Regular 2G", throughput: 250, latency: 300}, 254 {id: "edge", title: "Regular 2G", throughput: 250, latency: 300},
291 {id: "2g+", title: "Good 2G", throughput: 450, latency: 150}, 255 {id: "2g+", title: "Good 2G", throughput: 450, latency: 150},
292 {id: "3g", title: "Regular 3G", throughput: 750, latency: 100}, 256 {id: "3g", title: "Regular 3G", throughput: 750, latency: 100},
293 {id: "3g+", title: "Good 3G", throughput: 1.5 * 1024, latency: 40}, 257 {id: "3g+", title: "Good 3G", throughput: 1.5 * 1024, latency: 40},
294 {id: "4g", title: "Regular 4G", throughput: 4 * 1024, latency: 20}, 258 {id: "4g", title: "Regular 4G", throughput: 4 * 1024, latency: 20},
295 {id: "dsl", title: "DSL", throughput: 2 * 1024, latency: 5}, 259 {id: "dsl", title: "DSL", throughput: 2 * 1024, latency: 5},
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 {title: "iPhone \u2014 iOS 7", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_ 0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/1 1A4449d Safari/9537.53"}, 293 {title: "iPhone \u2014 iOS 7", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_ 0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/1 1A4449d Safari/9537.53"},
330 {title: "iPhone \u2014 iOS 6", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 6_ 0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A53 76e Safari/8536.25"}, 294 {title: "iPhone \u2014 iOS 6", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 6_ 0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A53 76e Safari/8536.25"},
331 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9) AppleW ebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13"}, 295 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9) AppleW ebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13"},
332 {title: "Opera 18 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537. 36 OPR/18.0.1284.68"}, 296 {title: "Opera 18 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537. 36 OPR/18.0.1284.68"},
333 {title: "Opera 18 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 6.1) Appl eWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.12 84.68"}, 297 {title: "Opera 18 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 6.1) Appl eWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.12 84.68"},
334 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, 298 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"},
335 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"}, 299 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"},
336 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5.0 (Linux ; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"}, 300 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5.0 (Linux ; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"},
337 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Ge cko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"} 301 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Ge cko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"}
338 ]; 302 ];
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/EmulatedDevices.js ('k') | Source/devtools/front_end/inspector.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698