OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 { | 764 { |
765 if (InspectorFrontendHost.isHostedMode()) | 765 if (InspectorFrontendHost.isHostedMode()) |
766 return false; | 766 return false; |
767 | 767 |
768 InspectorFrontendHost.resetZoom(); | 768 InspectorFrontendHost.resetZoom(); |
769 return true; | 769 return true; |
770 } | 770 } |
771 } | 771 } |
772 | 772 |
773 /** | 773 /** |
774 * @constructor | |
775 * @extends {WebInspector.UISettingDelegate} | |
776 */ | |
777 WebInspector.Main.ShortcutPanelSwitchSettingDelegate = function() | |
778 { | |
779 WebInspector.UISettingDelegate.call(this); | |
780 } | |
781 | |
782 WebInspector.Main.ShortcutPanelSwitchSettingDelegate.prototype = { | |
783 /** | |
784 * @override | |
785 * @return {!Element} | |
786 */ | |
787 settingElement: function() | |
788 { | |
789 var modifier = WebInspector.platform() === "mac" ? "Cmd" : "Ctrl"; | |
790 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Enable %s + 1-9 shortcut to switch panels", modifier), WebInspector.settings
.shortcutPanelSwitch); | |
791 }, | |
792 | |
793 __proto__: WebInspector.UISettingDelegate.prototype | |
794 } | |
795 | |
796 /** | |
797 * @param {boolean} hard | 774 * @param {boolean} hard |
798 * @return {boolean} | 775 * @return {boolean} |
799 */ | 776 */ |
800 WebInspector.Main._reloadPage = function(hard) | 777 WebInspector.Main._reloadPage = function(hard) |
801 { | 778 { |
802 if (!WebInspector.targetManager.hasTargets()) | 779 if (!WebInspector.targetManager.hasTargets()) |
803 return false; | 780 return false; |
804 if (WebInspector.targetManager.mainTarget().isServiceWorker()) | 781 if (WebInspector.targetManager.mainTarget().isServiceWorker()) |
805 return false; | 782 return false; |
806 WebInspector.targetManager.reloadPage(hard); | 783 WebInspector.targetManager.reloadPage(hard); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 _settingChanged: function(event) | 963 _settingChanged: function(event) |
987 { | 964 { |
988 var value = this._setting.get(); | 965 var value = this._setting.get(); |
989 var targets = WebInspector.OverridesSupport.targetsSupportingEmulation()
; | 966 var targets = WebInspector.OverridesSupport.targetsSupportingEmulation()
; |
990 for (var i = 0; i < targets.length; ++i) | 967 for (var i = 0; i < targets.length; ++i) |
991 targets[i].emulationAgent().setScriptExecutionDisabled(value); | 968 targets[i].emulationAgent().setScriptExecutionDisabled(value); |
992 } | 969 } |
993 } | 970 } |
994 | 971 |
995 new WebInspector.Main(); | 972 new WebInspector.Main(); |
OLD | NEW |