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

Side by Side Diff: content/renderer/web_preferences.cc

Issue 64843004: Get rid of user-level styles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to ToT Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/renderer/web_preferences.h" 5 #include "content/public/renderer/web_preferences.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "third_party/WebKit/public/platform/WebString.h" 8 #include "third_party/WebKit/public/platform/WebString.h"
9 #include "third_party/WebKit/public/platform/WebURL.h" 9 #include "third_party/WebKit/public/platform/WebURL.h"
10 #include "third_party/WebKit/public/web/WebKit.h" 10 #include "third_party/WebKit/public/web/WebKit.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 settings->setLoadsImagesAutomatically(prefs.loads_images_automatically); 139 settings->setLoadsImagesAutomatically(prefs.loads_images_automatically);
140 settings->setImagesEnabled(prefs.images_enabled); 140 settings->setImagesEnabled(prefs.images_enabled);
141 settings->setPluginsEnabled(prefs.plugins_enabled); 141 settings->setPluginsEnabled(prefs.plugins_enabled);
142 settings->setDOMPasteAllowed(prefs.dom_paste_enabled); 142 settings->setDOMPasteAllowed(prefs.dom_paste_enabled);
143 settings->setNeedsSiteSpecificQuirks(prefs.site_specific_quirks_enabled); 143 settings->setNeedsSiteSpecificQuirks(prefs.site_specific_quirks_enabled);
144 settings->setShrinksStandaloneImagesToFit( 144 settings->setShrinksStandaloneImagesToFit(
145 prefs.shrinks_standalone_images_to_fit); 145 prefs.shrinks_standalone_images_to_fit);
146 settings->setUsesEncodingDetector(prefs.uses_universal_detector); 146 settings->setUsesEncodingDetector(prefs.uses_universal_detector);
147 settings->setTextAreasAreResizable(prefs.text_areas_are_resizable); 147 settings->setTextAreasAreResizable(prefs.text_areas_are_resizable);
148 settings->setAllowScriptsToCloseWindows(prefs.allow_scripts_to_close_windows); 148 settings->setAllowScriptsToCloseWindows(prefs.allow_scripts_to_close_windows);
149 if (prefs.user_style_sheet_enabled)
150 settings->setUserStyleSheetLocation(prefs.user_style_sheet_location);
151 else
152 settings->setUserStyleSheetLocation(WebURL());
153 settings->setDownloadableBinaryFontsEnabled(prefs.remote_fonts_enabled); 149 settings->setDownloadableBinaryFontsEnabled(prefs.remote_fonts_enabled);
154 settings->setJavaScriptCanAccessClipboard( 150 settings->setJavaScriptCanAccessClipboard(
155 prefs.javascript_can_access_clipboard); 151 prefs.javascript_can_access_clipboard);
156 WebRuntimeFeatures::enableXSLT(prefs.xslt_enabled); 152 WebRuntimeFeatures::enableXSLT(prefs.xslt_enabled);
157 settings->setXSSAuditorEnabled(prefs.xss_auditor_enabled); 153 settings->setXSSAuditorEnabled(prefs.xss_auditor_enabled);
158 settings->setDNSPrefetchingEnabled(prefs.dns_prefetching_enabled); 154 settings->setDNSPrefetchingEnabled(prefs.dns_prefetching_enabled);
159 settings->setLocalStorageEnabled(prefs.local_storage_enabled); 155 settings->setLocalStorageEnabled(prefs.local_storage_enabled);
160 settings->setSyncXHRInDocumentsEnabled(prefs.sync_xhr_in_documents_enabled); 156 settings->setSyncXHRInDocumentsEnabled(prefs.sync_xhr_in_documents_enabled);
161 WebRuntimeFeatures::enableDatabase(prefs.databases_enabled); 157 WebRuntimeFeatures::enableDatabase(prefs.databases_enabled);
162 settings->setOfflineWebApplicationCacheEnabled( 158 settings->setOfflineWebApplicationCacheEnabled(
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 settings->setPinchVirtualViewportEnabled( 361 settings->setPinchVirtualViewportEnabled(
366 prefs.pinch_virtual_viewport_enabled); 362 prefs.pinch_virtual_viewport_enabled);
367 363
368 settings->setPinchOverlayScrollbarThickness( 364 settings->setPinchOverlayScrollbarThickness(
369 prefs.pinch_overlay_scrollbar_thickness); 365 prefs.pinch_overlay_scrollbar_thickness);
370 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); 366 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars);
371 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); 367 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing);
372 } 368 }
373 369
374 } // namespace content 370 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | content/shell/common/webkit_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698