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" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
17 #include "unicode/uchar.h" | 18 #include "unicode/uchar.h" |
18 #include "webkit/glue/webkit_glue.h" | 19 #include "webkit/glue/webkit_glue.h" |
19 | 20 |
20 using WebKit::WebNetworkStateNotifier; | 21 using WebKit::WebNetworkStateNotifier; |
21 using WebKit::WebRuntimeFeatures; | 22 using WebKit::WebRuntimeFeatures; |
22 using WebKit::WebSettings; | 23 using WebKit::WebSettings; |
| 24 using WebKit::WebSize; |
23 using WebKit::WebString; | 25 using WebKit::WebString; |
24 using WebKit::WebURL; | 26 using WebKit::WebURL; |
25 using WebKit::WebView; | 27 using WebKit::WebView; |
26 | 28 |
27 namespace webkit_glue { | 29 namespace webkit_glue { |
28 | 30 |
29 // "Zyyy" is the ISO 15924 script code for undetermined script aka Common. | 31 // "Zyyy" is the ISO 15924 script code for undetermined script aka Common. |
30 const char WebPreferences::kCommonScript[] = "Zyyy"; | 32 const char WebPreferences::kCommonScript[] = "Zyyy"; |
31 | 33 |
32 WebPreferences::WebPreferences() | 34 WebPreferences::WebPreferences() |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 fullscreen_enabled(false), | 97 fullscreen_enabled(false), |
96 allow_displaying_insecure_content(true), | 98 allow_displaying_insecure_content(true), |
97 allow_running_insecure_content(false), | 99 allow_running_insecure_content(false), |
98 password_echo_enabled(false), | 100 password_echo_enabled(false), |
99 should_print_backgrounds(false), | 101 should_print_backgrounds(false), |
100 enable_scroll_animator(false), | 102 enable_scroll_animator(false), |
101 hixie76_websocket_protocol_enabled(false), | 103 hixie76_websocket_protocol_enabled(false), |
102 visual_word_movement_enabled(false), | 104 visual_word_movement_enabled(false), |
103 per_tile_painting_enabled(false), | 105 per_tile_painting_enabled(false), |
104 css_regions_enabled(false), | 106 css_regions_enabled(false), |
105 css_shaders_enabled(false) { | 107 css_shaders_enabled(false), |
| 108 default_tile_width(256), |
| 109 default_tile_height(256), |
| 110 max_untiled_layer_width(512), |
| 111 max_untiled_layer_height(512) { |
106 standard_font_family_map[kCommonScript] = | 112 standard_font_family_map[kCommonScript] = |
107 ASCIIToUTF16("Times New Roman"); | 113 ASCIIToUTF16("Times New Roman"); |
108 fixed_font_family_map[kCommonScript] = | 114 fixed_font_family_map[kCommonScript] = |
109 ASCIIToUTF16("Courier New"); | 115 ASCIIToUTF16("Courier New"); |
110 serif_font_family_map[kCommonScript] = | 116 serif_font_family_map[kCommonScript] = |
111 ASCIIToUTF16("Times New Roman"); | 117 ASCIIToUTF16("Times New Roman"); |
112 sans_serif_font_family_map[kCommonScript] = | 118 sans_serif_font_family_map[kCommonScript] = |
113 ASCIIToUTF16("Arial"); | 119 ASCIIToUTF16("Arial"); |
114 cursive_font_family_map[kCommonScript] = | 120 cursive_font_family_map[kCommonScript] = |
115 ASCIIToUTF16("Script"); | 121 ASCIIToUTF16("Script"); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 settings->setHixie76WebSocketProtocolEnabled( | 353 settings->setHixie76WebSocketProtocolEnabled( |
348 hixie76_websocket_protocol_enabled); | 354 hixie76_websocket_protocol_enabled); |
349 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); | 355 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); |
350 | 356 |
351 // Enable per-tile painting if requested on the command line. | 357 // Enable per-tile painting if requested on the command line. |
352 settings->setPerTilePaintingEnabled(per_tile_painting_enabled); | 358 settings->setPerTilePaintingEnabled(per_tile_painting_enabled); |
353 | 359 |
354 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled); | 360 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled); |
355 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled); | 361 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled); |
356 | 362 |
| 363 settings->setDefaultTileSize( |
| 364 WebSize(default_tile_width, default_tile_height)); |
| 365 settings->setMaxUntiledLayerSize( |
| 366 WebSize(max_untiled_layer_width, max_untiled_layer_height)); |
| 367 |
357 WebNetworkStateNotifier::setOnLine(is_online); | 368 WebNetworkStateNotifier::setOnLine(is_online); |
358 } | 369 } |
359 | 370 |
360 } // namespace webkit_glue | 371 } // namespace webkit_glue |
OLD | NEW |