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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js

Issue 1460433002: [DevTools] Persist device mode state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js ('k') | no next file » | 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 var showRulersValue = WebInspector.moduleSetting("showMetricsRulers").ge t(); 751 var showRulersValue = WebInspector.moduleSetting("showMetricsRulers").ge t();
752 for (var target of WebInspector.targetManager.targets(WebInspector.Targe t.Type.Page)) { 752 for (var target of WebInspector.targetManager.targets(WebInspector.Targe t.Type.Page)) {
753 var domModel = WebInspector.DOMModel.fromTarget(target); 753 var domModel = WebInspector.DOMModel.fromTarget(target);
754 if (domModel) 754 if (domModel)
755 domModel.setHighlightSettings(showRulersValue && !this._pageResi zerActive(), showRulersValue); 755 domModel.setHighlightSettings(showRulersValue && !this._pageResi zerActive(), showRulersValue);
756 } 756 }
757 }, 757 },
758 758
759 _onMainFrameNavigated: function() 759 _onMainFrameNavigated: function()
760 { 760 {
761 this._deviceMetricsChanged(false); 761 if (!Runtime.experiments.isEnabled("deviceMode"))
762 this._deviceMetricsChanged(false);
762 this._updateUserAgentWarningMessage(""); 763 this._updateUserAgentWarningMessage("");
763 this._updateDeviceMetricsWarningMessage(""); 764 this._updateDeviceMetricsWarningMessage("");
764 }, 765 },
765 766
766 _dispatchWarningChanged: function() 767 _dispatchWarningChanged: function()
767 { 768 {
768 this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.Overr idesWarningUpdated); 769 this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.Overr idesWarningUpdated);
769 }, 770 },
770 771
771 /** 772 /**
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 }, 811 },
811 812
812 __proto__: WebInspector.Object.prototype 813 __proto__: WebInspector.Object.prototype
813 } 814 }
814 815
815 816
816 /** 817 /**
817 * @type {!WebInspector.OverridesSupport} 818 * @type {!WebInspector.OverridesSupport}
818 */ 819 */
819 WebInspector.overridesSupport; 820 WebInspector.overridesSupport;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698