Chromium Code Reviews| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 }, | 269 }, |
| 270 | 270 |
| 271 /** | 271 /** |
| 272 * @param {boolean} enabled | 272 * @param {boolean} enabled |
| 273 */ | 273 */ |
| 274 setEmulationEnabled: function(enabled) | 274 setEmulationEnabled: function(enabled) |
| 275 { | 275 { |
| 276 if (this.canEmulate()) { | 276 if (this.canEmulate()) { |
| 277 this.settings._emulationEnabled.set(enabled); | 277 this.settings._emulationEnabled.set(enabled); |
| 278 this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.E mulationStateChanged); | 278 this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.E mulationStateChanged); |
| 279 if (enabled && this.settings.emulateResolution.get()) | |
| 280 PageAgent.resetScrollAndPageScaleFactor(); | |
|
pfeldman
2014/07/11 15:15:55
You should use the target's agent.
dgozman
2014/07/14 10:30:04
Done.
| |
| 279 } | 281 } |
| 280 }, | 282 }, |
| 281 | 283 |
| 282 /** | 284 /** |
| 283 * @return {boolean} | 285 * @return {boolean} |
| 284 */ | 286 */ |
| 285 responsiveDesignAvailable: function() | 287 responsiveDesignAvailable: function() |
| 286 { | 288 { |
| 287 return this._responsiveDesignAvailable; | 289 return this._responsiveDesignAvailable; |
| 288 }, | 290 }, |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 if (this.settings.overrideGeolocation.get()) | 459 if (this.settings.overrideGeolocation.get()) |
| 458 this._geolocationPositionChanged(); | 460 this._geolocationPositionChanged(); |
| 459 | 461 |
| 460 if (this.settings.emulateTouch.get()) | 462 if (this.settings.emulateTouch.get()) |
| 461 this._emulateTouchEventsChanged(); | 463 this._emulateTouchEventsChanged(); |
| 462 | 464 |
| 463 if (this.settings.overrideCSSMedia.get()) | 465 if (this.settings.overrideCSSMedia.get()) |
| 464 this._cssMediaChanged(); | 466 this._cssMediaChanged(); |
| 465 | 467 |
| 466 this._deviceMetricsChanged(); | 468 this._deviceMetricsChanged(); |
| 469 if (this.settings.emulateResolution.get()) | |
| 470 PageAgent.resetScrollAndPageScaleFactor(); | |
| 467 | 471 |
| 468 this._userAgentChanged(); | 472 this._userAgentChanged(); |
| 469 | 473 |
| 470 if (this.networkThroughputIsLimited()) | 474 if (this.networkThroughputIsLimited()) |
| 471 this._networkConditionsChanged(); | 475 this._networkConditionsChanged(); |
| 472 }, | 476 }, |
| 473 | 477 |
| 474 _userAgentChanged: function() | 478 _userAgentChanged: function() |
| 475 { | 479 { |
| 476 if (this._userAgentChangedListenerMuted) | 480 if (this._userAgentChangedListenerMuted) |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 822 }, | 826 }, |
| 823 | 827 |
| 824 __proto__: WebInspector.Object.prototype | 828 __proto__: WebInspector.Object.prototype |
| 825 } | 829 } |
| 826 | 830 |
| 827 | 831 |
| 828 /** | 832 /** |
| 829 * @type {!WebInspector.OverridesSupport} | 833 * @type {!WebInspector.OverridesSupport} |
| 830 */ | 834 */ |
| 831 WebInspector.overridesSupport; | 835 WebInspector.overridesSupport; |
| OLD | NEW |