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

Side by Side Diff: Source/devtools/front_end/sdk/OverridesSupport.js

Issue 355393004: [DevTools] Rename "emulateViewport" to "mobile". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: another rebase Created 6 years, 5 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
« no previous file with comments | « Source/devtools/front_end/elements/OverridesView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @implements {WebInspector.TargetManager.Observer} 33 * @implements {WebInspector.TargetManager.Observer}
34 * @extends {WebInspector.Object} 34 * @extends {WebInspector.Object}
35 * @param {boolean} responsiveDesignAvailable 35 * @param {boolean} responsiveDesignAvailable
36 */ 36 */
37 WebInspector.OverridesSupport = function(responsiveDesignAvailable) 37 WebInspector.OverridesSupport = function(responsiveDesignAvailable)
38 { 38 {
39 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._onMainFrameNavigated.bind(this), this); 39 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._onMainFrameNavigated.bind(this), this);
40 this._touchEmulationSuspended = false; 40 this._touchEmulationSuspended = false;
41 this._emulateViewportEnabled = false; 41 this._emulateMobileEnabled = false;
42 this._userAgent = ""; 42 this._userAgent = "";
43 this._pageResizer = null; 43 this._pageResizer = null;
44 this._deviceScale = 1; 44 this._deviceScale = 1;
45 this._fixedDeviceScale = false; 45 this._fixedDeviceScale = false;
46 this._initialized = false; 46 this._initialized = false;
47 this._deviceMetricsThrottler = new WebInspector.Throttler(0); 47 this._deviceMetricsThrottler = new WebInspector.Throttler(0);
48 this._responsiveDesignAvailable = responsiveDesignAvailable; 48 this._responsiveDesignAvailable = responsiveDesignAvailable;
49 WebInspector.targetManager.observeTargets(this); 49 WebInspector.targetManager.observeTargets(this);
50 } 50 }
51 51
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 * @param {string} userAgent 86 * @param {string} userAgent
87 * @constructor 87 * @constructor
88 */ 88 */
89 WebInspector.OverridesSupport.Device = function(description, userAgent) 89 WebInspector.OverridesSupport.Device = function(description, userAgent)
90 { 90 {
91 this.width = 800; 91 this.width = 800;
92 this.height = 600; 92 this.height = 600;
93 this.deviceScaleFactor = 1; 93 this.deviceScaleFactor = 1;
94 this.userAgent = userAgent; 94 this.userAgent = userAgent;
95 this.touch = true; 95 this.touch = true;
96 this.viewport = true; 96 this.mobile = true;
97 97
98 var splitMetrics = description.split("x"); 98 var splitMetrics = description.split("x");
99 if (splitMetrics.length >= 3) { 99 if (splitMetrics.length >= 3) {
100 this.width = parseInt(splitMetrics[0], 10); 100 this.width = parseInt(splitMetrics[0], 10);
101 this.height = parseInt(splitMetrics[1], 10); 101 this.height = parseInt(splitMetrics[1], 10);
102 this.deviceScaleFactor = parseFloat(splitMetrics[2]); 102 this.deviceScaleFactor = parseFloat(splitMetrics[2]);
103 } 103 }
104 if (splitMetrics.length >= 4) 104 if (splitMetrics.length >= 4)
105 this.touch = splitMetrics[3] == 1; 105 this.touch = splitMetrics[3] == 1;
106 if (splitMetrics.length >= 5) 106 if (splitMetrics.length >= 5)
107 this.viewport = splitMetrics[4] == 1; 107 this.mobile = splitMetrics[4] == 1;
108 } 108 }
109 109
110 /** 110 /**
111 * @constructor 111 * @constructor
112 * @param {number} latitude 112 * @param {number} latitude
113 * @param {number} longitude 113 * @param {number} longitude
114 * @param {string} error 114 * @param {string} error
115 */ 115 */
116 WebInspector.OverridesSupport.GeolocationPosition = function(latitude, longitude , error) 116 WebInspector.OverridesSupport.GeolocationPosition = function(latitude, longitude , error)
117 { 117 {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 return ""; 268 return "";
269 return WebInspector.UIString("Value must be non-negative float"); 269 return WebInspector.UIString("Value must be non-negative float");
270 } 270 }
271 271
272 // Second element is user agent value. 272 // Second element is user agent value.
273 // Third element lists device metrics separated by 'x': 273 // Third element lists device metrics separated by 'x':
274 // - screen width, 274 // - screen width,
275 // - screen height, 275 // - screen height,
276 // - device scale factor, 276 // - device scale factor,
277 // - touch (true by default if not present), 277 // - touch (true by default if not present),
278 // - viewport (true by default if not present). 278 // - mobile (true by default if not present).
279 WebInspector.OverridesSupport._phones = [ 279 WebInspector.OverridesSupport._phones = [
280 ["Apple iPhone 3GS", 280 ["Apple iPhone 3GS",
281 "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWeb Kit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5", 281 "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWeb Kit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5",
282 "320x480x1"], 282 "320x480x1"],
283 ["Apple iPhone 4", 283 ["Apple iPhone 4",
284 "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWeb Kit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5", 284 "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWeb Kit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5",
285 "320x480x2"], 285 "320x480x2"],
286 ["Apple iPhone 5", 286 ["Apple iPhone 5",
287 "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/5 37.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53", 287 "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/5 37.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
288 "320x568x2"], 288 "320x568x2"],
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 emulateDevice: function(device) 500 emulateDevice: function(device)
501 { 501 {
502 this._deviceMetricsChangedListenerMuted = true; 502 this._deviceMetricsChangedListenerMuted = true;
503 this._userAgentChangedListenerMuted = true; 503 this._userAgentChangedListenerMuted = true;
504 this.settings.userAgent.set(device.userAgent); 504 this.settings.userAgent.set(device.userAgent);
505 this.settings.emulateResolution.set(true); 505 this.settings.emulateResolution.set(true);
506 this.settings.deviceWidth.set(device.width); 506 this.settings.deviceWidth.set(device.width);
507 this.settings.deviceHeight.set(device.height); 507 this.settings.deviceHeight.set(device.height);
508 this.settings.deviceScaleFactor.set(device.deviceScaleFactor); 508 this.settings.deviceScaleFactor.set(device.deviceScaleFactor);
509 this.settings.emulateTouch.set(device.touch); 509 this.settings.emulateTouch.set(device.touch);
510 this.settings.emulateViewport.set(device.viewport); 510 this.settings.emulateMobile.set(device.mobile);
511 delete this._deviceMetricsChangedListenerMuted; 511 delete this._deviceMetricsChangedListenerMuted;
512 delete this._userAgentChangedListenerMuted; 512 delete this._userAgentChangedListenerMuted;
513 513
514 if (this._initialized) { 514 if (this._initialized) {
515 this._deviceMetricsChanged(); 515 this._deviceMetricsChanged();
516 this._userAgentChanged(); 516 this._userAgentChanged();
517 PageAgent.resetScrollAndPageScaleFactor(); 517 PageAgent.resetScrollAndPageScaleFactor();
518 } 518 }
519 }, 519 },
520 520
521 reset: function() 521 reset: function()
522 { 522 {
523 this._deviceMetricsChangedListenerMuted = true; 523 this._deviceMetricsChangedListenerMuted = true;
524 this._userAgentChangedListenerMuted = true; 524 this._userAgentChangedListenerMuted = true;
525 this.settings.userAgent.set(""); 525 this.settings.userAgent.set("");
526 this.settings.emulateResolution.set(false); 526 this.settings.emulateResolution.set(false);
527 this.settings.deviceScaleFactor.set(0); 527 this.settings.deviceScaleFactor.set(0);
528 this.settings.emulateTouch.set(false); 528 this.settings.emulateTouch.set(false);
529 this.settings.emulateViewport.set(false); 529 this.settings.emulateMobile.set(false);
530 this.settings.overrideDeviceOrientation.set(false); 530 this.settings.overrideDeviceOrientation.set(false);
531 this.settings.overrideGeolocation.set(false); 531 this.settings.overrideGeolocation.set(false);
532 this.settings.overrideCSSMedia.set(false); 532 this.settings.overrideCSSMedia.set(false);
533 this.settings.networkConditions.set({throughput: WebInspector.OverridesS upport._networkThroughputUnlimitedValue, latency: 0}); 533 this.settings.networkConditions.set({throughput: WebInspector.OverridesS upport._networkThroughputUnlimitedValue, latency: 0});
534 delete this._deviceMetricsChangedListenerMuted; 534 delete this._deviceMetricsChangedListenerMuted;
535 delete this._userAgentChangedListenerMuted; 535 delete this._userAgentChangedListenerMuted;
536 536
537 if (this._initialized) { 537 if (this._initialized) {
538 this._deviceMetricsChanged(); 538 this._deviceMetricsChanged();
539 this._userAgentChanged(); 539 this._userAgentChanged();
540 } 540 }
541 }, 541 },
542 542
543 /** 543 /**
544 * @param {!WebInspector.OverridesSupport.Device} device 544 * @param {!WebInspector.OverridesSupport.Device} device
545 * @return {boolean} 545 * @return {boolean}
546 */ 546 */
547 isEmulatingDevice: function(device) 547 isEmulatingDevice: function(device)
548 { 548 {
549 return this.settings.userAgent.get() === device.userAgent 549 return this.settings.userAgent.get() === device.userAgent
550 && this.settings.deviceWidth.get() === device.width 550 && this.settings.deviceWidth.get() === device.width
551 && this.settings.deviceHeight.get() === device.height 551 && this.settings.deviceHeight.get() === device.height
552 && this.settings.deviceScaleFactor.get() === device.deviceScaleFacto r 552 && this.settings.deviceScaleFactor.get() === device.deviceScaleFacto r
553 && this.settings.emulateTouch.get() === device.touch 553 && this.settings.emulateTouch.get() === device.touch
554 && this.settings.emulateViewport.get() === device.viewport 554 && this.settings.emulateMobile.get() === device.mobile
555 && this.settings.emulateResolution.get(); 555 && this.settings.emulateResolution.get();
556 }, 556 },
557 557
558 /** 558 /**
559 * @param {boolean} suspended 559 * @param {boolean} suspended
560 */ 560 */
561 setTouchEmulationSuspended: function(suspended) 561 setTouchEmulationSuspended: function(suspended)
562 { 562 {
563 this._touchEmulationSuspended = suspended; 563 this._touchEmulationSuspended = suspended;
564 if (this._initialized) 564 if (this._initialized)
(...skipping 10 matching lines...) Expand all
575 this._initialized = true; 575 this._initialized = true;
576 576
577 this.settings._emulationEnabled.addChangeListener(this._userAgentChanged , this); 577 this.settings._emulationEnabled.addChangeListener(this._userAgentChanged , this);
578 this.settings.userAgent.addChangeListener(this._userAgentChanged, this); 578 this.settings.userAgent.addChangeListener(this._userAgentChanged, this);
579 579
580 this.settings._emulationEnabled.addChangeListener(this._deviceMetricsCha nged, this); 580 this.settings._emulationEnabled.addChangeListener(this._deviceMetricsCha nged, this);
581 this.settings.emulateResolution.addChangeListener(this._deviceMetricsCha nged, this); 581 this.settings.emulateResolution.addChangeListener(this._deviceMetricsCha nged, this);
582 this.settings.deviceWidth.addChangeListener(this._deviceMetricsChanged, this); 582 this.settings.deviceWidth.addChangeListener(this._deviceMetricsChanged, this);
583 this.settings.deviceHeight.addChangeListener(this._deviceMetricsChanged, this); 583 this.settings.deviceHeight.addChangeListener(this._deviceMetricsChanged, this);
584 this.settings.deviceScaleFactor.addChangeListener(this._deviceMetricsCha nged, this); 584 this.settings.deviceScaleFactor.addChangeListener(this._deviceMetricsCha nged, this);
585 this.settings.emulateViewport.addChangeListener(this._deviceMetricsChang ed, this); 585 this.settings.emulateMobile.addChangeListener(this._deviceMetricsChanged , this);
586 this.settings.deviceFitWindow.addChangeListener(this._deviceMetricsChang ed, this); 586 this.settings.deviceFitWindow.addChangeListener(this._deviceMetricsChang ed, this);
587 587
588 this.settings._emulationEnabled.addChangeListener(this._geolocationPosit ionChanged, this); 588 this.settings._emulationEnabled.addChangeListener(this._geolocationPosit ionChanged, this);
589 this.settings.overrideGeolocation.addChangeListener(this._geolocationPos itionChanged, this); 589 this.settings.overrideGeolocation.addChangeListener(this._geolocationPos itionChanged, this);
590 this.settings.geolocationOverride.addChangeListener(this._geolocationPos itionChanged, this); 590 this.settings.geolocationOverride.addChangeListener(this._geolocationPos itionChanged, this);
591 591
592 this.settings._emulationEnabled.addChangeListener(this._deviceOrientatio nChanged, this); 592 this.settings._emulationEnabled.addChangeListener(this._deviceOrientatio nChanged, this);
593 this.settings.overrideDeviceOrientation.addChangeListener(this._deviceOr ientationChanged, this); 593 this.settings.overrideDeviceOrientation.addChangeListener(this._deviceOr ientationChanged, this);
594 this.settings.deviceOrientationOverride.addChangeListener(this._deviceOr ientationChanged, this); 594 this.settings.deviceOrientationOverride.addChangeListener(this._deviceOr ientationChanged, this);
595 595
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 this._deviceMetricsThrottler.schedule(setDeviceMetricsOverride.bind(this )); 728 this._deviceMetricsThrottler.schedule(setDeviceMetricsOverride.bind(this ));
729 729
730 /** 730 /**
731 * @param {!WebInspector.Throttler.FinishCallback} finishCallback 731 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
732 * @this {WebInspector.OverridesSupport} 732 * @this {WebInspector.OverridesSupport}
733 */ 733 */
734 function setDeviceMetricsOverride(finishCallback) 734 function setDeviceMetricsOverride(finishCallback)
735 { 735 {
736 PageAgent.setDeviceMetricsOverride( 736 PageAgent.setDeviceMetricsOverride(
737 overrideWidth, overrideHeight, this.settings.deviceScaleFactor.g et(), 737 overrideWidth, overrideHeight, this.settings.deviceScaleFactor.g et(),
738 this.settings.emulateViewport.get(), this._pageResizer ? false : this.settings.deviceFitWindow.get(), scale, 0, 0, 738 this.settings.emulateMobile.get(), this._pageResizer ? false : t his.settings.deviceFitWindow.get(), scale, 0, 0,
739 apiCallback.bind(this, finishCallback)); 739 apiCallback.bind(this, finishCallback));
740 } 740 }
741 741
742 /** 742 /**
743 * @param {!WebInspector.Throttler.FinishCallback} finishCallback 743 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
744 * @this {WebInspector.OverridesSupport} 744 * @this {WebInspector.OverridesSupport}
745 */ 745 */
746 function clearDeviceMetricsOverride(finishCallback) 746 function clearDeviceMetricsOverride(finishCallback)
747 { 747 {
748 PageAgent.clearDeviceMetricsOverride(apiCallback.bind(this, finishCa llback)); 748 PageAgent.clearDeviceMetricsOverride(apiCallback.bind(this, finishCa llback));
749 } 749 }
750 750
751 /** 751 /**
752 * @param {!WebInspector.Throttler.FinishCallback} finishCallback 752 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
753 * @param {?Protocol.Error} error 753 * @param {?Protocol.Error} error
754 * @this {WebInspector.OverridesSupport} 754 * @this {WebInspector.OverridesSupport}
755 */ 755 */
756 function apiCallback(finishCallback, error) 756 function apiCallback(finishCallback, error)
757 { 757 {
758 if (error) { 758 if (error) {
759 this._updateDeviceMetricsWarningMessage(WebInspector.UIString("S creen emulation is not available on this page.")); 759 this._updateDeviceMetricsWarningMessage(WebInspector.UIString("S creen emulation is not available on this page."));
760 this._deviceMetricsOverrideAppliedForTest(); 760 this._deviceMetricsOverrideAppliedForTest();
761 finishCallback(); 761 finishCallback();
762 return; 762 return;
763 } 763 }
764 764
765 var viewportEnabled = this.emulationEnabled() && this.settings.emula teViewport.get(); 765 var mobileEnabled = this.emulationEnabled() && this.settings.emulate Mobile.get();
766 if (this._emulateViewportEnabled !== viewportEnabled) 766 if (this._emulateMobileEnabled !== mobileEnabled)
767 this._updateDeviceMetricsWarningMessage(WebInspector.UIString("Y ou might need to reload the page for proper user agent spoofing and viewport ren dering.")); 767 this._updateDeviceMetricsWarningMessage(WebInspector.UIString("Y ou might need to reload the page for proper user agent spoofing and viewport ren dering."));
768 this._emulateViewportEnabled = viewportEnabled; 768 this._emulateMobileEnabled = mobileEnabled;
769 this._deviceMetricsOverrideAppliedForTest(); 769 this._deviceMetricsOverrideAppliedForTest();
770 finishCallback(); 770 finishCallback();
771 } 771 }
772 }, 772 },
773 773
774 _deviceMetricsOverrideAppliedForTest: function() 774 _deviceMetricsOverrideAppliedForTest: function()
775 { 775 {
776 // Used for sniffing in tests. 776 // Used for sniffing in tests.
777 }, 777 },
778 778
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 this.settings = {}; 915 this.settings = {};
916 this.settings._emulationEnabled = WebInspector.settings.createSetting("e mulationEnabled", false); 916 this.settings._emulationEnabled = WebInspector.settings.createSetting("e mulationEnabled", false);
917 917
918 this.settings.userAgent = WebInspector.settings.createSetting("userAgent ", ""); 918 this.settings.userAgent = WebInspector.settings.createSetting("userAgent ", "");
919 919
920 this.settings.emulateResolution = WebInspector.settings.createSetting("e mulateResolution", true); 920 this.settings.emulateResolution = WebInspector.settings.createSetting("e mulateResolution", true);
921 this.settings.deviceWidth = WebInspector.settings.createSetting("deviceW idth", 360); 921 this.settings.deviceWidth = WebInspector.settings.createSetting("deviceW idth", 360);
922 this.settings.deviceHeight = WebInspector.settings.createSetting("device Height", 640); 922 this.settings.deviceHeight = WebInspector.settings.createSetting("device Height", 640);
923 this.settings.deviceScaleFactor = WebInspector.settings.createSetting("d eviceScaleFactor", 0); 923 this.settings.deviceScaleFactor = WebInspector.settings.createSetting("d eviceScaleFactor", 0);
924 this.settings.deviceFitWindow = WebInspector.settings.createSetting("dev iceFitWindow", true); 924 this.settings.deviceFitWindow = WebInspector.settings.createSetting("dev iceFitWindow", true);
925 // FIXME: rename viewport to mobile everywhere in the code. 925 this.settings.emulateMobile = WebInspector.settings.createSetting("emula teMobile", false);
926 this.settings.emulateViewport = WebInspector.settings.createSetting("emu lateViewport", false);
927 926
928 this.settings.emulateTouch = WebInspector.settings.createSetting("emulat eTouch", false); 927 this.settings.emulateTouch = WebInspector.settings.createSetting("emulat eTouch", false);
929 928
930 this.settings.overrideGeolocation = WebInspector.settings.createSetting( "overrideGeolocation", false); 929 this.settings.overrideGeolocation = WebInspector.settings.createSetting( "overrideGeolocation", false);
931 this.settings.geolocationOverride = WebInspector.settings.createSetting( "geolocationOverride", ""); 930 this.settings.geolocationOverride = WebInspector.settings.createSetting( "geolocationOverride", "");
932 931
933 this.settings.overrideDeviceOrientation = WebInspector.settings.createSe tting("overrideDeviceOrientation", false); 932 this.settings.overrideDeviceOrientation = WebInspector.settings.createSe tting("overrideDeviceOrientation", false);
934 this.settings.deviceOrientationOverride = WebInspector.settings.createSe tting("deviceOrientationOverride", ""); 933 this.settings.deviceOrientationOverride = WebInspector.settings.createSe tting("deviceOrientationOverride", "");
935 934
936 this.settings.overrideCSSMedia = WebInspector.settings.createSetting("ov errideCSSMedia", false); 935 this.settings.overrideCSSMedia = WebInspector.settings.createSetting("ov errideCSSMedia", false);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 } 1009 }
1011 } 1010 }
1012 1011
1013 deviceSelectElement.addEventListener("change", deviceSelected, false); 1012 deviceSelectElement.addEventListener("change", deviceSelected, false);
1014 1013
1015 var emulatedSettingChangedMuted = false; 1014 var emulatedSettingChangedMuted = false;
1016 WebInspector.overridesSupport.settings.emulateResolution.addChangeListen er(emulatedSettingChanged); 1015 WebInspector.overridesSupport.settings.emulateResolution.addChangeListen er(emulatedSettingChanged);
1017 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(emu latedSettingChanged); 1016 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(emu latedSettingChanged);
1018 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(em ulatedSettingChanged); 1017 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(em ulatedSettingChanged);
1019 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListen er(emulatedSettingChanged); 1018 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListen er(emulatedSettingChanged);
1020 WebInspector.overridesSupport.settings.emulateViewport.addChangeListener (emulatedSettingChanged); 1019 WebInspector.overridesSupport.settings.emulateMobile.addChangeListener(e mulatedSettingChanged);
1021 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(em ulatedSettingChanged); 1020 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(em ulatedSettingChanged);
1022 WebInspector.overridesSupport.settings.userAgent.addChangeListener(emula tedSettingChanged); 1021 WebInspector.overridesSupport.settings.userAgent.addChangeListener(emula tedSettingChanged);
1023 emulatedSettingChanged(); 1022 emulatedSettingChanged();
1024 1023
1025 function deviceSelected() 1024 function deviceSelected()
1026 { 1025 {
1027 if (deviceSelectElement.selectedIndex === 0) 1026 if (deviceSelectElement.selectedIndex === 0)
1028 return; 1027 return;
1029 1028
1030 var option = deviceSelectElement.options[deviceSelectElement.selecte dIndex]; 1029 var option = deviceSelectElement.options[deviceSelectElement.selecte dIndex];
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 }, 1121 },
1123 1122
1124 __proto__: WebInspector.Object.prototype 1123 __proto__: WebInspector.Object.prototype
1125 } 1124 }
1126 1125
1127 1126
1128 /** 1127 /**
1129 * @type {!WebInspector.OverridesSupport} 1128 * @type {!WebInspector.OverridesSupport}
1130 */ 1129 */
1131 WebInspector.overridesSupport; 1130 WebInspector.overridesSupport;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/OverridesView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698