Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 storagePrefix = '__custom__'; | 77 storagePrefix = '__custom__'; |
| 78 else if (!Runtime.queryParam('can_dock') && !!Runtime.queryParam('debugFront end') && !Host.isUnderTest(prefs)) | 78 else if (!Runtime.queryParam('can_dock') && !!Runtime.queryParam('debugFront end') && !Host.isUnderTest(prefs)) |
| 79 storagePrefix = '__bundled__'; | 79 storagePrefix = '__bundled__'; |
| 80 var clearLocalStorage = window.localStorage ? window.localStorage.clear.bind (window.localStorage) : undefined; | 80 var clearLocalStorage = window.localStorage ? window.localStorage.clear.bind (window.localStorage) : undefined; |
| 81 var localStorage = | 81 var localStorage = |
| 82 new Common.SettingsStorage(window.localStorage || {}, undefined, undefin ed, clearLocalStorage, storagePrefix); | 82 new Common.SettingsStorage(window.localStorage || {}, undefined, undefin ed, clearLocalStorage, storagePrefix); |
| 83 var globalStorage = new Common.SettingsStorage( | 83 var globalStorage = new Common.SettingsStorage( |
| 84 prefs, InspectorFrontendHost.setPreference, InspectorFrontendHost.remove Preference, | 84 prefs, InspectorFrontendHost.setPreference, InspectorFrontendHost.remove Preference, |
| 85 InspectorFrontendHost.clearPreferences, storagePrefix); | 85 InspectorFrontendHost.clearPreferences, storagePrefix); |
| 86 Common.settings = new Common.Settings(globalStorage, localStorage); | 86 Common.settings = new Common.Settings(globalStorage, localStorage); |
| 87 Common.moduleSetting('javaScriptDisabled').set(false); | |
|
pfeldman
2017/02/23 01:30:50
Should we introduce session settings instead? 'ses
| |
| 87 if (!Host.isUnderTest(prefs)) | 88 if (!Host.isUnderTest(prefs)) |
| 88 new Common.VersionController().updateVersion(); | 89 new Common.VersionController().updateVersion(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 /** | 92 /** |
| 92 * @param {!Object<string, string>} prefs | 93 * @param {!Object<string, string>} prefs |
| 93 */ | 94 */ |
| 94 _initializeExperiments(prefs) { | 95 _initializeExperiments(prefs) { |
| 95 Runtime.experiments.register('accessibilityInspection', 'Accessibility Inspe ction'); | 96 Runtime.experiments.register('accessibilityInspection', 'Accessibility Inspe ction'); |
| 96 Runtime.experiments.register('applyCustomStylesheet', 'Allow custom UI theme s'); | 97 Runtime.experiments.register('applyCustomStylesheet', 'Allow custom UI theme s'); |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 976 * @override | 977 * @override |
| 977 * @return {?Element} | 978 * @return {?Element} |
| 978 */ | 979 */ |
| 979 settingElement() { | 980 settingElement() { |
| 980 return UI.SettingsUI.createSettingCheckbox( | 981 return UI.SettingsUI.createSettingCheckbox( |
| 981 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); | 982 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); |
| 982 } | 983 } |
| 983 }; | 984 }; |
| 984 | 985 |
| 985 new Main.Main(); | 986 new Main.Main(); |
| OLD | NEW |