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

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

Issue 693893002: [DevTools] Add configuration parameter to Page.setTouchEmulationEnabled. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/sdk/DOMModel.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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/DOMModel.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698