| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 this.settings.overrideCSSMedia.addChangeListener(this._cssMediaChanged,
this); | 467 this.settings.overrideCSSMedia.addChangeListener(this._cssMediaChanged,
this); |
| 468 this.settings.emulatedCSSMedia.addChangeListener(this._cssMediaChanged,
this); | 468 this.settings.emulatedCSSMedia.addChangeListener(this._cssMediaChanged,
this); |
| 469 | 469 |
| 470 this.settings._emulationEnabled.addChangeListener(this._networkCondition
sChanged, this); | 470 this.settings._emulationEnabled.addChangeListener(this._networkCondition
sChanged, this); |
| 471 this.settings.networkConditions.addChangeListener(this._networkCondition
sChanged, this); | 471 this.settings.networkConditions.addChangeListener(this._networkCondition
sChanged, this); |
| 472 | 472 |
| 473 this.settings._emulationEnabled.addChangeListener(this._showRulersChange
d, this); | 473 this.settings._emulationEnabled.addChangeListener(this._showRulersChange
d, this); |
| 474 WebInspector.settings.showMetricsRulers.addChangeListener(this._showRule
rsChanged, this); | 474 WebInspector.settings.showMetricsRulers.addChangeListener(this._showRule
rsChanged, this); |
| 475 this._showRulersChanged(); | 475 this._showRulersChanged(); |
| 476 | 476 |
| 477 WebInspector.settings.disableOverridesWarning.addChangeListener(this._di
spatchWarningChanged, this); | |
| 478 | |
| 479 if (!this.emulationEnabled()) | 477 if (!this.emulationEnabled()) |
| 480 return; | 478 return; |
| 481 | 479 |
| 482 if (this.settings.overrideDeviceOrientation.get()) | 480 if (this.settings.overrideDeviceOrientation.get()) |
| 483 this._deviceOrientationChanged(); | 481 this._deviceOrientationChanged(); |
| 484 | 482 |
| 485 if (this.settings.overrideGeolocation.get()) | 483 if (this.settings.overrideGeolocation.get()) |
| 486 this._geolocationPositionChanged(); | 484 this._geolocationPositionChanged(); |
| 487 | 485 |
| 488 if (this.settings.emulateTouch.get()) | 486 if (this.settings.emulateTouch.get()) |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 { | 752 { |
| 755 this._userAgentWarningMessage = warningMessage; | 753 this._userAgentWarningMessage = warningMessage; |
| 756 this._dispatchWarningChanged(); | 754 this._dispatchWarningChanged(); |
| 757 }, | 755 }, |
| 758 | 756 |
| 759 /** | 757 /** |
| 760 * @return {string} | 758 * @return {string} |
| 761 */ | 759 */ |
| 762 warningMessage: function() | 760 warningMessage: function() |
| 763 { | 761 { |
| 764 return WebInspector.settings.disableOverridesWarning.get() ? "" : (this.
_deviceMetricsWarningMessage || this._userAgentWarningMessage || ""); | 762 return this._deviceMetricsWarningMessage || this._userAgentWarningMessag
e || ""; |
| 765 }, | 763 }, |
| 766 | 764 |
| 767 clearWarningMessage: function() | 765 clearWarningMessage: function() |
| 768 { | 766 { |
| 769 this._deviceMetricsWarningMessage = ""; | 767 this._deviceMetricsWarningMessage = ""; |
| 770 this._userAgentWarningMessage = ""; | 768 this._userAgentWarningMessage = ""; |
| 771 this._dispatchWarningChanged(); | 769 this._dispatchWarningChanged(); |
| 772 }, | 770 }, |
| 773 | 771 |
| 774 /** | 772 /** |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 }, | 816 }, |
| 819 | 817 |
| 820 __proto__: WebInspector.Object.prototype | 818 __proto__: WebInspector.Object.prototype |
| 821 } | 819 } |
| 822 | 820 |
| 823 | 821 |
| 824 /** | 822 /** |
| 825 * @type {!WebInspector.OverridesSupport} | 823 * @type {!WebInspector.OverridesSupport} |
| 826 */ | 824 */ |
| 827 WebInspector.overridesSupport; | 825 WebInspector.overridesSupport; |
| OLD | NEW |