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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/files/scoped_file.h" | 13 #include "base/files/scoped_file.h" |
14 #include "base/i18n/icu_util.h" | 14 #include "base/i18n/icu_util.h" |
15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "base/prefs/scoped_user_pref_update.h" | 18 #include "base/prefs/scoped_user_pref_update.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
| 22 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
22 #include "chrome/browser/browser_about_handler.h" | 23 #include "chrome/browser/browser_about_handler.h" |
23 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
24 #include "chrome/browser/browser_shutdown.h" | 25 #include "chrome/browser/browser_shutdown.h" |
25 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 26 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
26 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 27 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
27 #include "chrome/browser/character_encoding.h" | 28 #include "chrome/browser/character_encoding.h" |
28 #include "chrome/browser/chrome_content_browser_client_parts.h" | 29 #include "chrome/browser/chrome_content_browser_client_parts.h" |
29 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 30 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
30 #include "chrome/browser/chrome_quota_permission_context.h" | 31 #include "chrome/browser/chrome_quota_permission_context.h" |
31 #include "chrome/browser/content_settings/cookie_settings.h" | 32 #include "chrome/browser/content_settings/cookie_settings.h" |
(...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 web_prefs->asynchronous_spell_checking_enabled = true; | 2271 web_prefs->asynchronous_spell_checking_enabled = true; |
2271 web_prefs->unified_textchecker_enabled = true; | 2272 web_prefs->unified_textchecker_enabled = true; |
2272 | 2273 |
2273 web_prefs->uses_universal_detector = | 2274 web_prefs->uses_universal_detector = |
2274 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 2275 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
2275 web_prefs->text_areas_are_resizable = | 2276 web_prefs->text_areas_are_resizable = |
2276 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 2277 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
2277 web_prefs->hyperlink_auditing_enabled = | 2278 web_prefs->hyperlink_auditing_enabled = |
2278 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); | 2279 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
2279 | 2280 |
| 2281 std::string image_animation_policy = |
| 2282 prefs->GetString(prefs::kAnimationPolicy); |
| 2283 if (image_animation_policy == kAnimationPolicyOnce) |
| 2284 web_prefs->animation_policy = |
| 2285 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| 2286 else if (image_animation_policy == kAnimationPolicyNone) |
| 2287 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| 2288 else |
| 2289 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| 2290 |
2280 // Make sure we will set the default_encoding with canonical encoding name. | 2291 // Make sure we will set the default_encoding with canonical encoding name. |
2281 web_prefs->default_encoding = | 2292 web_prefs->default_encoding = |
2282 CharacterEncoding::GetCanonicalEncodingNameByAliasName( | 2293 CharacterEncoding::GetCanonicalEncodingNameByAliasName( |
2283 web_prefs->default_encoding); | 2294 web_prefs->default_encoding); |
2284 if (web_prefs->default_encoding.empty()) { | 2295 if (web_prefs->default_encoding.empty()) { |
2285 prefs->ClearPref(prefs::kDefaultCharset); | 2296 prefs->ClearPref(prefs::kDefaultCharset); |
2286 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); | 2297 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); |
2287 } | 2298 } |
2288 DCHECK(!web_prefs->default_encoding.empty()); | 2299 DCHECK(!web_prefs->default_encoding.empty()); |
2289 | 2300 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2627 switches::kDisableWebRtcEncryption, | 2638 switches::kDisableWebRtcEncryption, |
2628 }; | 2639 }; |
2629 to_command_line->CopySwitchesFrom(from_command_line, | 2640 to_command_line->CopySwitchesFrom(from_command_line, |
2630 kWebRtcDevSwitchNames, | 2641 kWebRtcDevSwitchNames, |
2631 arraysize(kWebRtcDevSwitchNames)); | 2642 arraysize(kWebRtcDevSwitchNames)); |
2632 } | 2643 } |
2633 } | 2644 } |
2634 #endif // defined(ENABLE_WEBRTC) | 2645 #endif // defined(ENABLE_WEBRTC) |
2635 | 2646 |
2636 } // namespace chrome | 2647 } // namespace chrome |
OLD | NEW |