OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/glue/webpreferences.h" | 5 #include "webkit/glue/webpreferences.h" |
6 | 6 |
7 #include <unicode/uchar.h> | 7 #include <unicode/uchar.h> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 settings->setUserStyleSheetLocation(user_style_sheet_location); | 200 settings->setUserStyleSheetLocation(user_style_sheet_location); |
201 else | 201 else |
202 settings->setUserStyleSheetLocation(WebURL()); | 202 settings->setUserStyleSheetLocation(WebURL()); |
203 settings->setAuthorAndUserStylesEnabled(author_and_user_styles_enabled); | 203 settings->setAuthorAndUserStylesEnabled(author_and_user_styles_enabled); |
204 settings->setUsesPageCache(uses_page_cache); | 204 settings->setUsesPageCache(uses_page_cache); |
205 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); | 205 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); |
206 settings->setJavaScriptCanAccessClipboard(javascript_can_access_clipboard); | 206 settings->setJavaScriptCanAccessClipboard(javascript_can_access_clipboard); |
207 settings->setXSSAuditorEnabled(xss_auditor_enabled); | 207 settings->setXSSAuditorEnabled(xss_auditor_enabled); |
208 settings->setDNSPrefetchingEnabled(dns_prefetching_enabled); | 208 settings->setDNSPrefetchingEnabled(dns_prefetching_enabled); |
209 settings->setLocalStorageEnabled(local_storage_enabled); | 209 settings->setLocalStorageEnabled(local_storage_enabled); |
210 WebRuntimeFeatures::enableDatabase( | 210 WebRuntimeFeatures::enableDatabase(databases_enabled); |
211 WebRuntimeFeatures::isDatabaseEnabled() || databases_enabled); | |
212 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); | 211 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); |
213 settings->setCaretBrowsingEnabled(caret_browsing_enabled); | 212 settings->setCaretBrowsingEnabled(caret_browsing_enabled); |
214 settings->setHyperlinkAuditingEnabled(hyperlink_auditing_enabled); | 213 settings->setHyperlinkAuditingEnabled(hyperlink_auditing_enabled); |
215 | 214 |
216 // This setting affects the behavior of links in an editable region: | 215 // This setting affects the behavior of links in an editable region: |
217 // clicking the link should select it rather than navigate to it. | 216 // clicking the link should select it rather than navigate to it. |
218 // Safari uses the same default. It is unlikley an embedder would want to | 217 // Safari uses the same default. It is unlikley an embedder would want to |
219 // change this, since it would break existing rich text editors. | 218 // change this, since it would break existing rich text editors. |
220 settings->setEditableLinkBehaviorNeverLive(); | 219 settings->setEditableLinkBehaviorNeverLive(); |
221 | 220 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 settings->setEnableScrollAnimator(enable_scroll_animator); | 334 settings->setEnableScrollAnimator(enable_scroll_animator); |
336 settings->setHixie76WebSocketProtocolEnabled( | 335 settings->setHixie76WebSocketProtocolEnabled( |
337 hixie76_websocket_protocol_enabled); | 336 hixie76_websocket_protocol_enabled); |
338 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); | 337 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); |
339 | 338 |
340 // Enable per-tile painting if requested on the command line. | 339 // Enable per-tile painting if requested on the command line. |
341 settings->setPerTilePaintingEnabled(per_tile_painting_enabled); | 340 settings->setPerTilePaintingEnabled(per_tile_painting_enabled); |
342 | 341 |
343 WebNetworkStateNotifier::setOnLine(is_online); | 342 WebNetworkStateNotifier::setOnLine(is_online); |
344 } | 343 } |
OLD | NEW |