Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: content/public/common/web_preferences.cc

Issue 2496593002: Adding an experimental flag to block autoplay with sound in cross-origin iframes (Closed)
Patch Set: falling back to adding a boolean flag Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 progress_bar_completion(ProgressBarCompletion::LOAD_EVENT), 209 progress_bar_completion(ProgressBarCompletion::LOAD_EVENT),
210 spellcheck_enabled_by_default(true), 210 spellcheck_enabled_by_default(true),
211 #else
212 cross_origin_media_playback_requires_user_gesture(false),
211 #endif 213 #endif
212 #if defined(OS_ANDROID) 214 #if defined(OS_ANDROID)
213 default_minimum_page_scale_factor(0.25f), 215 default_minimum_page_scale_factor(0.25f),
214 default_maximum_page_scale_factor(5.f), 216 default_maximum_page_scale_factor(5.f),
215 #elif defined(OS_MACOSX) 217 #elif defined(OS_MACOSX)
216 default_minimum_page_scale_factor(1.f), 218 default_minimum_page_scale_factor(1.f),
217 default_maximum_page_scale_factor(3.f), 219 default_maximum_page_scale_factor(3.f),
218 #else 220 #else
219 default_minimum_page_scale_factor(1.f), 221 default_minimum_page_scale_factor(1.f),
220 default_maximum_page_scale_factor(4.f), 222 default_maximum_page_scale_factor(4.f),
221 #endif 223 #endif
222 hide_download_ui(false) { 224 hide_download_ui(false) {
223 standard_font_family_map[kCommonScript] = 225 standard_font_family_map[kCommonScript] =
224 base::ASCIIToUTF16("Times New Roman"); 226 base::ASCIIToUTF16("Times New Roman");
225 fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New"); 227 fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New");
226 serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman"); 228 serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman");
227 sans_serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Arial"); 229 sans_serif_font_family_map[kCommonScript] = base::ASCIIToUTF16("Arial");
228 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script"); 230 cursive_font_family_map[kCommonScript] = base::ASCIIToUTF16("Script");
229 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact"); 231 fantasy_font_family_map[kCommonScript] = base::ASCIIToUTF16("Impact");
230 pictograph_font_family_map[kCommonScript] = 232 pictograph_font_family_map[kCommonScript] =
231 base::ASCIIToUTF16("Times New Roman"); 233 base::ASCIIToUTF16("Times New Roman");
232 } 234 }
233 235
234 WebPreferences::WebPreferences(const WebPreferences& other) = default; 236 WebPreferences::WebPreferences(const WebPreferences& other) = default;
235 237
236 WebPreferences::~WebPreferences() { 238 WebPreferences::~WebPreferences() {
237 } 239 }
238 240
239 } // namespace content 241 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698