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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_OFF, | 34 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_OFF, |
35 WebSettings::V8CacheOptionsOff); | 35 WebSettings::V8CacheOptionsOff); |
36 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_PARSE, | 36 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_PARSE, |
37 WebSettings::V8CacheOptionsParse); | 37 WebSettings::V8CacheOptionsParse); |
38 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_CODE, | 38 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_CODE, |
39 WebSettings::V8CacheOptionsCode); | 39 WebSettings::V8CacheOptionsCode); |
40 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_LAST, | 40 COMPILE_ASSERT_MATCHING_ENUMS(V8_CACHE_OPTIONS_LAST, |
41 WebSettings::V8CacheOptionsCode); | 41 WebSettings::V8CacheOptionsCode); |
42 | 42 |
| 43 COMPILE_ASSERT_MATCHING_ENUMS(POINTER_TYPE_NONE, |
| 44 WebSettings::PointerTypeNone); |
| 45 COMPILE_ASSERT_MATCHING_ENUMS(POINTER_TYPE_COARSE, |
| 46 WebSettings::PointerTypeCoarse); |
| 47 COMPILE_ASSERT_MATCHING_ENUMS(POINTER_TYPE_FINE, |
| 48 WebSettings::PointerTypeFine); |
| 49 |
| 50 COMPILE_ASSERT_MATCHING_ENUMS(HOVER_TYPE_NONE, |
| 51 WebSettings::HoverTypeNone); |
| 52 COMPILE_ASSERT_MATCHING_ENUMS(HOVER_TYPE_ON_DEMAND, |
| 53 WebSettings::HoverTypeOnDemand); |
| 54 COMPILE_ASSERT_MATCHING_ENUMS(HOVER_TYPE_HOVER, |
| 55 WebSettings::HoverTypeHover); |
| 56 |
43 WebPreferences::WebPreferences() | 57 WebPreferences::WebPreferences() |
44 : default_font_size(16), | 58 : default_font_size(16), |
45 default_fixed_font_size(13), | 59 default_fixed_font_size(13), |
46 minimum_font_size(0), | 60 minimum_font_size(0), |
47 minimum_logical_font_size(6), | 61 minimum_logical_font_size(6), |
48 default_encoding("ISO-8859-1"), | 62 default_encoding("ISO-8859-1"), |
49 javascript_enabled(true), | 63 javascript_enabled(true), |
50 web_security_enabled(true), | 64 web_security_enabled(true), |
51 javascript_can_open_windows_automatically(true), | 65 javascript_can_open_windows_automatically(true), |
52 loads_images_automatically(true), | 66 loads_images_automatically(true), |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 password_echo_enabled(false), | 114 password_echo_enabled(false), |
101 should_print_backgrounds(false), | 115 should_print_backgrounds(false), |
102 should_clear_document_background(true), | 116 should_clear_document_background(true), |
103 enable_scroll_animator(false), | 117 enable_scroll_animator(false), |
104 region_based_columns_enabled(false), | 118 region_based_columns_enabled(false), |
105 touch_enabled(false), | 119 touch_enabled(false), |
106 device_supports_touch(false), | 120 device_supports_touch(false), |
107 device_supports_mouse(true), | 121 device_supports_mouse(true), |
108 touch_adjustment_enabled(true), | 122 touch_adjustment_enabled(true), |
109 pointer_events_max_touch_points(0), | 123 pointer_events_max_touch_points(0), |
| 124 available_pointer_types(0), |
| 125 primary_pointer_type(POINTER_TYPE_NONE), |
| 126 available_hover_types(0), |
| 127 primary_hover_type(HOVER_TYPE_NONE), |
110 sync_xhr_in_documents_enabled(true), | 128 sync_xhr_in_documents_enabled(true), |
111 deferred_image_decoding_enabled(false), | 129 deferred_image_decoding_enabled(false), |
112 should_respect_image_orientation(false), | 130 should_respect_image_orientation(false), |
113 number_of_cpu_cores(1), | 131 number_of_cpu_cores(1), |
114 #if defined(OS_MACOSX) | 132 #if defined(OS_MACOSX) |
115 editing_behavior(EDITING_BEHAVIOR_MAC), | 133 editing_behavior(EDITING_BEHAVIOR_MAC), |
116 #elif defined(OS_WIN) | 134 #elif defined(OS_WIN) |
117 editing_behavior(EDITING_BEHAVIOR_WIN), | 135 editing_behavior(EDITING_BEHAVIOR_WIN), |
118 #elif defined(OS_ANDROID) | 136 #elif defined(OS_ANDROID) |
119 editing_behavior(EDITING_BEHAVIOR_ANDROID), | 137 editing_behavior(EDITING_BEHAVIOR_ANDROID), |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); | 191 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); |
174 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); | 192 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); |
175 pictograph_font_family_map[kCommonScript] = | 193 pictograph_font_family_map[kCommonScript] = |
176 base::ASCIIToUTF16("Times New Roman"); | 194 base::ASCIIToUTF16("Times New Roman"); |
177 } | 195 } |
178 | 196 |
179 WebPreferences::~WebPreferences() { | 197 WebPreferences::~WebPreferences() { |
180 } | 198 } |
181 | 199 |
182 } // namespace content | 200 } // namespace content |
OLD | NEW |