OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/web_preferences.h" | 5 #include "content/public/common/web_preferences.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "third_party/WebKit/public/web/WebSettings.h" | 10 #include "third_party/WebKit/public/web/WebSettings.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_MAC, | 25 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_MAC, |
26 WebSettings::EditingBehaviorMac); | 26 WebSettings::EditingBehaviorMac); |
27 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_WIN, | 27 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_WIN, |
28 WebSettings::EditingBehaviorWin); | 28 WebSettings::EditingBehaviorWin); |
29 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_UNIX, | 29 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_UNIX, |
30 WebSettings::EditingBehaviorUnix); | 30 WebSettings::EditingBehaviorUnix); |
31 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_ANDROID, | 31 COMPILE_ASSERT_MATCHING_ENUMS(EDITING_BEHAVIOR_ANDROID, |
32 WebSettings::EditingBehaviorAndroid); | 32 WebSettings::EditingBehaviorAndroid); |
33 | 33 |
| 34 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_OFF, |
| 35 WebSettings::V8CacheOptionsOff); |
| 36 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_PARSE, |
| 37 WebSettings::V8CacheOptionsParse); |
| 38 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_CODE, |
| 39 WebSettings::V8CacheOptionsCode); |
| 40 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_LAST, |
| 41 WebSettings::V8CacheOptionsCode); |
| 42 |
34 WebPreferences::WebPreferences() | 43 WebPreferences::WebPreferences() |
35 : default_font_size(16), | 44 : default_font_size(16), |
36 default_fixed_font_size(13), | 45 default_fixed_font_size(13), |
37 minimum_font_size(0), | 46 minimum_font_size(0), |
38 minimum_logical_font_size(6), | 47 minimum_logical_font_size(6), |
39 default_encoding("ISO-8859-1"), | 48 default_encoding("ISO-8859-1"), |
40 javascript_enabled(true), | 49 javascript_enabled(true), |
41 web_security_enabled(true), | 50 web_security_enabled(true), |
42 javascript_can_open_windows_automatically(true), | 51 javascript_can_open_windows_automatically(true), |
43 loads_images_automatically(true), | 52 loads_images_automatically(true), |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 #if defined(OS_MACOSX) | 130 #if defined(OS_MACOSX) |
122 smart_insert_delete_enabled(true), | 131 smart_insert_delete_enabled(true), |
123 #else | 132 #else |
124 smart_insert_delete_enabled(false), | 133 smart_insert_delete_enabled(false), |
125 #endif | 134 #endif |
126 spatial_navigation_enabled(false), | 135 spatial_navigation_enabled(false), |
127 pinch_virtual_viewport_enabled(false), | 136 pinch_virtual_viewport_enabled(false), |
128 pinch_overlay_scrollbar_thickness(0), | 137 pinch_overlay_scrollbar_thickness(0), |
129 use_solid_color_scrollbars(false), | 138 use_solid_color_scrollbars(false), |
130 navigate_on_drag_drop(true), | 139 navigate_on_drag_drop(true), |
| 140 v8_cache_options(V8_CACHE_OPTIONS_OFF), |
131 cookie_enabled(true), | 141 cookie_enabled(true), |
132 pepper_accelerated_video_decode_enabled(false) | 142 pepper_accelerated_video_decode_enabled(false) |
133 #if defined(OS_ANDROID) | 143 #if defined(OS_ANDROID) |
134 , | 144 , |
135 text_autosizing_enabled(true), | 145 text_autosizing_enabled(true), |
136 font_scale_factor(1.0f), | 146 font_scale_factor(1.0f), |
137 device_scale_adjustment(1.0f), | 147 device_scale_adjustment(1.0f), |
138 force_enable_zoom(false), | 148 force_enable_zoom(false), |
139 disallow_fullscreen_for_non_media_elements(false), | 149 disallow_fullscreen_for_non_media_elements(false), |
140 fullscreen_supported(true), | 150 fullscreen_supported(true), |
(...skipping 20 matching lines...) Expand all Loading... |
161 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); | 171 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); |
162 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); | 172 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); |
163 pictograph_font_family_map[kCommonScript] = | 173 pictograph_font_family_map[kCommonScript] = |
164 base::ASCIIToUTF16("Times New Roman"); | 174 base::ASCIIToUTF16("Times New Roman"); |
165 } | 175 } |
166 | 176 |
167 WebPreferences::~WebPreferences() { | 177 WebPreferences::~WebPreferences() { |
168 } | 178 } |
169 | 179 |
170 } // namespace content | 180 } // namespace content |
OLD | NEW |