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

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

Issue 1160883011: [DevTools] Remove external device list update. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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()
11 { 11 {
12 var p = createElement("p"); 12 var p = createElement("p");
13 13
14 var deviceSelectElement = p.createChild("select"); 14 var deviceSelectElement = p.createChild("select");
15 deviceSelectElement.addEventListener("change", deviceSelected, false); 15 deviceSelectElement.addEventListener("change", deviceSelected, false);
16 16
17 // This has to be object, not boolean, otherwise its value doesn't update pr operly. 17 // This has to be object, not boolean, otherwise its value doesn't update pr operly.
18 var emulatedSettingChangedMuted = { muted: false }; 18 var emulatedSettingChangedMuted = { muted: false };
19 WebInspector.overridesSupport.settings.emulateResolution.addChangeListener(e mulatedSettingChanged); 19 WebInspector.overridesSupport.settings.emulateResolution.addChangeListener(e mulatedSettingChanged);
20 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(emulate dSettingChanged); 20 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(emulate dSettingChanged);
21 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(emulat edSettingChanged); 21 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(emulat edSettingChanged);
22 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListener(e mulatedSettingChanged); 22 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListener(e mulatedSettingChanged);
23 WebInspector.overridesSupport.settings.emulateMobile.addChangeListener(emula tedSettingChanged); 23 WebInspector.overridesSupport.settings.emulateMobile.addChangeListener(emula tedSettingChanged);
24 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(emulat edSettingChanged); 24 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(emulat edSettingChanged);
25 WebInspector.overridesSupport.settings.userAgent.addChangeListener(emulatedS ettingChanged); 25 WebInspector.overridesSupport.settings.userAgent.addChangeListener(emulatedS ettingChanged);
26 26
27 WebInspector.emulatedDevicesList.addEventListener(WebInspector.EmulatedDevic esList.Events.CustomDevicesUpdated, deviceListChanged); 27 WebInspector.emulatedDevicesList.addEventListener(WebInspector.EmulatedDevic esList.Events.CustomDevicesUpdated, deviceListChanged);
28 WebInspector.emulatedDevicesList.addEventListener(WebInspector.EmulatedDevic esList.Events.StandardDevicesUpdated, deviceListChanged); 28 WebInspector.emulatedDevicesList.addEventListener(WebInspector.EmulatedDevic esList.Events.StandardDevicesUpdated, deviceListChanged);
29 WebInspector.emulatedDevicesList.maybeAutoUpdate();
30 deviceListChanged(); 29 deviceListChanged();
31 30
32 function deviceSelected() 31 function deviceSelected()
33 { 32 {
34 if (deviceSelectElement.selectedIndex === 0) 33 if (deviceSelectElement.selectedIndex === 0)
35 return; 34 return;
36 35
37 var option = deviceSelectElement.options[deviceSelectElement.selectedInd ex]; 36 var option = deviceSelectElement.options[deviceSelectElement.selectedInd ex];
38 emulatedSettingChangedMuted.muted = true; 37 emulatedSettingChangedMuted.muted = true;
39 WebInspector.overridesSupport.emulateDevice(option.overridesDevice); 38 WebInspector.overridesSupport.emulateDevice(option.overridesDevice);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 {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"}, 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"},
331 {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"}, 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"},
332 {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"}, 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"},
333 {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"}, 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"},
334 {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"}, 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"},
335 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, 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"},
336 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/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"},
337 {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"}, 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"},
338 {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"} 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"}
339 ]; 338 ];
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/EmulatedDevices.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698