| 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/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "third_party/WebKit/public/web/WebSettings.h" | 10 #include "third_party/WebKit/public/web/WebSettings.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 use_wide_viewport(true), | 199 use_wide_viewport(true), |
| 200 force_zero_layout_height(false), | 200 force_zero_layout_height(false), |
| 201 viewport_meta_layout_size_quirk(false), | 201 viewport_meta_layout_size_quirk(false), |
| 202 viewport_meta_merge_content_quirk(false), | 202 viewport_meta_merge_content_quirk(false), |
| 203 viewport_meta_non_user_scalable_quirk(false), | 203 viewport_meta_non_user_scalable_quirk(false), |
| 204 viewport_meta_zero_values_quirk(false), | 204 viewport_meta_zero_values_quirk(false), |
| 205 clobber_user_agent_initial_scale_quirk(false), | 205 clobber_user_agent_initial_scale_quirk(false), |
| 206 ignore_main_frame_overflow_hidden_quirk(false), | 206 ignore_main_frame_overflow_hidden_quirk(false), |
| 207 report_screen_size_in_physical_pixels_quirk(false), | 207 report_screen_size_in_physical_pixels_quirk(false), |
| 208 resue_global_for_unowned_main_frame(false), | 208 resue_global_for_unowned_main_frame(false), |
| 209 autoplay_muted_videos_enabled(false), | |
| 210 progress_bar_completion(ProgressBarCompletion::LOAD_EVENT), | 209 progress_bar_completion(ProgressBarCompletion::LOAD_EVENT), |
| 211 spellcheck_enabled_by_default(true), | 210 spellcheck_enabled_by_default(true), |
| 212 #endif | 211 #endif |
| 212 autoplay_muted_videos_enabled(false), |
| 213 #if !defined(OS_ANDROID) |
| 214 user_gesture_required_for_media_playback_in_cross_origin_iframes(false), |
| 215 #endif |
| 216 |
| 213 #if defined(OS_ANDROID) | 217 #if defined(OS_ANDROID) |
| 214 default_minimum_page_scale_factor(0.25f), | 218 default_minimum_page_scale_factor(0.25f), |
| 215 default_maximum_page_scale_factor(5.f), | 219 default_maximum_page_scale_factor(5.f), |
| 216 #elif defined(OS_MACOSX) | 220 #elif defined(OS_MACOSX) |
| 217 default_minimum_page_scale_factor(1.f), | 221 default_minimum_page_scale_factor(1.f), |
| 218 default_maximum_page_scale_factor(3.f), | 222 default_maximum_page_scale_factor(3.f), |
| 219 #else | 223 #else |
| 220 default_minimum_page_scale_factor(1.f), | 224 default_minimum_page_scale_factor(1.f), |
| 221 default_maximum_page_scale_factor(4.f), | 225 default_maximum_page_scale_factor(4.f), |
| 222 #endif | 226 #endif |
| 223 hide_download_ui(false) { | 227 hide_download_ui(false) { |
| 224 standard_font_family_map[kCommonScript] = | 228 standard_font_family_map[kCommonScript] = |
| 225 base::ASCIIToUTF16("Times New Roman"); | 229 base::ASCIIToUTF16("Times New Roman"); |
| 226 fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New"); | 230 fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New"); |
| 227 serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman"); | 231 serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman"); |
| 228 sans_serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Arial"); | 232 sans_serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Arial"); |
| 229 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); | 233 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); |
| 230 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); | 234 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); |
| 231 pictograph_font_family_map[kCommonScript] = | 235 pictograph_font_family_map[kCommonScript] = |
| 232 base::ASCIIToUTF16("Times New Roman"); | 236 base::ASCIIToUTF16("Times New Roman"); |
| 233 } | 237 } |
| 234 | 238 |
| 235 WebPreferences::WebPreferences(const WebPreferences& other) = default; | 239 WebPreferences::WebPreferences(const WebPreferences& other) = default; |
| 236 | 240 |
| 237 WebPreferences::~WebPreferences() { | 241 WebPreferences::~WebPreferences() { |
| 238 } | 242 } |
| 239 | 243 |
| 240 } // namespace content | 244 } // namespace content |
| OLD | NEW |