OLD | NEW |
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.
parseSetting(this.settings.deviceOrientationOverride.get()); | 666 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.
parseSetting(this.settings.deviceOrientationOverride.get()); |
667 PageAgent.setDeviceOrientationOverride(deviceOrientation.alpha, deviceOr
ientation.beta, deviceOrientation.gamma); | 667 PageAgent.setDeviceOrientationOverride(deviceOrientation.alpha, deviceOr
ientation.beta, deviceOrientation.gamma); |
668 }, | 668 }, |
669 | 669 |
670 _emulateTouchEventsChanged: function() | 670 _emulateTouchEventsChanged: function() |
671 { | 671 { |
672 var emulateTouch = this.emulationEnabled() && this.settings.emulateTouch
.get() && !this._touchEmulationSuspended; | 672 var emulateTouch = this.emulationEnabled() && this.settings.emulateTouch
.get() && !this._touchEmulationSuspended; |
673 var targets = WebInspector.targetManager.targets(); | 673 var targets = WebInspector.targetManager.targets(); |
674 for (var i = 0; i < targets.length; ++i) | 674 for (var i = 0; i < targets.length; ++i) |
675 targets[i].domModel.emulateTouchEventObjects(emulateTouch); | 675 targets[i].domModel.emulateTouchEventObjects(emulateTouch, this.sett
ings.emulateMobile.get() ? "mobile" : "desktop"); |
676 }, | 676 }, |
677 | 677 |
678 _cssMediaChanged: function() | 678 _cssMediaChanged: function() |
679 { | 679 { |
680 var enabled = this.emulationEnabled() && this.settings.overrideCSSMedia.
get(); | 680 var enabled = this.emulationEnabled() && this.settings.overrideCSSMedia.
get(); |
681 PageAgent.setEmulatedMedia(enabled ? this.settings.emulatedCSSMedia.get(
) : ""); | 681 PageAgent.setEmulatedMedia(enabled ? this.settings.emulatedCSSMedia.get(
) : ""); |
682 var targets = WebInspector.targetManager.targets(); | 682 var targets = WebInspector.targetManager.targets(); |
683 for (var i = 0; i < targets.length; ++i) | 683 for (var i = 0; i < targets.length; ++i) |
684 targets[i].cssModel.mediaQueryResultChanged(); | 684 targets[i].cssModel.mediaQueryResultChanged(); |
685 }, | 685 }, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 }, | 816 }, |
817 | 817 |
818 __proto__: WebInspector.Object.prototype | 818 __proto__: WebInspector.Object.prototype |
819 } | 819 } |
820 | 820 |
821 | 821 |
822 /** | 822 /** |
823 * @type {!WebInspector.OverridesSupport} | 823 * @type {!WebInspector.OverridesSupport} |
824 */ | 824 */ |
825 WebInspector.overridesSupport; | 825 WebInspector.overridesSupport; |
OLD | NEW |