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 "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 enable_scroll_animator(false), | 104 enable_scroll_animator(false), |
105 hixie76_websocket_protocol_enabled(false), | 105 hixie76_websocket_protocol_enabled(false), |
106 visual_word_movement_enabled(false), | 106 visual_word_movement_enabled(false), |
107 per_tile_painting_enabled(false), | 107 per_tile_painting_enabled(false), |
108 css_regions_enabled(false), | 108 css_regions_enabled(false), |
109 css_shaders_enabled(false), | 109 css_shaders_enabled(false), |
110 default_tile_width(256), | 110 default_tile_width(256), |
111 default_tile_height(256), | 111 default_tile_height(256), |
112 max_untiled_layer_width(512), | 112 max_untiled_layer_width(512), |
113 max_untiled_layer_height(512), | 113 max_untiled_layer_height(512), |
114 fixed_position_creates_stacking_context(false) { | 114 fixed_position_creates_stacking_context(false), |
| 115 sync_xhr_in_documents_enabled(true) { |
115 standard_font_family_map[kCommonScript] = | 116 standard_font_family_map[kCommonScript] = |
116 ASCIIToUTF16("Times New Roman"); | 117 ASCIIToUTF16("Times New Roman"); |
117 fixed_font_family_map[kCommonScript] = | 118 fixed_font_family_map[kCommonScript] = |
118 ASCIIToUTF16("Courier New"); | 119 ASCIIToUTF16("Courier New"); |
119 serif_font_family_map[kCommonScript] = | 120 serif_font_family_map[kCommonScript] = |
120 ASCIIToUTF16("Times New Roman"); | 121 ASCIIToUTF16("Times New Roman"); |
121 sans_serif_font_family_map[kCommonScript] = | 122 sans_serif_font_family_map[kCommonScript] = |
122 ASCIIToUTF16("Arial"); | 123 ASCIIToUTF16("Arial"); |
123 cursive_font_family_map[kCommonScript] = | 124 cursive_font_family_map[kCommonScript] = |
124 ASCIIToUTF16("Script"); | 125 ASCIIToUTF16("Script"); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 settings->setUserStyleSheetLocation(user_style_sheet_location); | 222 settings->setUserStyleSheetLocation(user_style_sheet_location); |
222 else | 223 else |
223 settings->setUserStyleSheetLocation(WebURL()); | 224 settings->setUserStyleSheetLocation(WebURL()); |
224 settings->setAuthorAndUserStylesEnabled(author_and_user_styles_enabled); | 225 settings->setAuthorAndUserStylesEnabled(author_and_user_styles_enabled); |
225 settings->setUsesPageCache(uses_page_cache); | 226 settings->setUsesPageCache(uses_page_cache); |
226 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); | 227 settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled); |
227 settings->setJavaScriptCanAccessClipboard(javascript_can_access_clipboard); | 228 settings->setJavaScriptCanAccessClipboard(javascript_can_access_clipboard); |
228 settings->setXSSAuditorEnabled(xss_auditor_enabled); | 229 settings->setXSSAuditorEnabled(xss_auditor_enabled); |
229 settings->setDNSPrefetchingEnabled(dns_prefetching_enabled); | 230 settings->setDNSPrefetchingEnabled(dns_prefetching_enabled); |
230 settings->setLocalStorageEnabled(local_storage_enabled); | 231 settings->setLocalStorageEnabled(local_storage_enabled); |
| 232 settings->setSyncXHRInDocumentsEnabled(sync_xhr_in_documents_enabled); |
231 WebRuntimeFeatures::enableDatabase(databases_enabled); | 233 WebRuntimeFeatures::enableDatabase(databases_enabled); |
232 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); | 234 settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); |
233 settings->setCaretBrowsingEnabled(caret_browsing_enabled); | 235 settings->setCaretBrowsingEnabled(caret_browsing_enabled); |
234 settings->setHyperlinkAuditingEnabled(hyperlink_auditing_enabled); | 236 settings->setHyperlinkAuditingEnabled(hyperlink_auditing_enabled); |
235 | 237 |
236 // This setting affects the behavior of links in an editable region: | 238 // This setting affects the behavior of links in an editable region: |
237 // clicking the link should select it rather than navigate to it. | 239 // clicking the link should select it rather than navigate to it. |
238 // Safari uses the same default. It is unlikley an embedder would want to | 240 // Safari uses the same default. It is unlikley an embedder would want to |
239 // change this, since it would break existing rich text editors. | 241 // change this, since it would break existing rich text editors. |
240 settings->setEditableLinkBehaviorNeverLive(); | 242 settings->setEditableLinkBehaviorNeverLive(); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 settings->setMaxUntiledLayerSize( | 376 settings->setMaxUntiledLayerSize( |
375 WebSize(max_untiled_layer_width, max_untiled_layer_height)); | 377 WebSize(max_untiled_layer_width, max_untiled_layer_height)); |
376 | 378 |
377 settings->setFixedPositionCreatesStackingContext( | 379 settings->setFixedPositionCreatesStackingContext( |
378 fixed_position_creates_stacking_context); | 380 fixed_position_creates_stacking_context); |
379 | 381 |
380 WebNetworkStateNotifier::setOnLine(is_online); | 382 WebNetworkStateNotifier::setOnLine(is_online); |
381 } | 383 } |
382 | 384 |
383 } // namespace webkit_glue | 385 } // namespace webkit_glue |
OLD | NEW |