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 |
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2262 web_prefs->asynchronous_spell_checking_enabled = true; | 2262 web_prefs->asynchronous_spell_checking_enabled = true; |
2263 web_prefs->unified_textchecker_enabled = true; | 2263 web_prefs->unified_textchecker_enabled = true; |
2264 | 2264 |
2265 web_prefs->uses_universal_detector = | 2265 web_prefs->uses_universal_detector = |
2266 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 2266 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
2267 web_prefs->text_areas_are_resizable = | 2267 web_prefs->text_areas_are_resizable = |
2268 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 2268 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
2269 web_prefs->hyperlink_auditing_enabled = | 2269 web_prefs->hyperlink_auditing_enabled = |
2270 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); | 2270 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
2271 | 2271 |
| 2272 std::string image_animation_policy = |
| 2273 prefs->GetString(prefs::kAnimationPolicy); |
| 2274 if (image_animation_policy == "once") |
| 2275 web_prefs->animation_policy = |
| 2276 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| 2277 else if (image_animation_policy == "none") |
| 2278 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| 2279 else |
| 2280 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| 2281 |
2272 // Make sure we will set the default_encoding with canonical encoding name. | 2282 // Make sure we will set the default_encoding with canonical encoding name. |
2273 web_prefs->default_encoding = | 2283 web_prefs->default_encoding = |
2274 CharacterEncoding::GetCanonicalEncodingNameByAliasName( | 2284 CharacterEncoding::GetCanonicalEncodingNameByAliasName( |
2275 web_prefs->default_encoding); | 2285 web_prefs->default_encoding); |
2276 if (web_prefs->default_encoding.empty()) { | 2286 if (web_prefs->default_encoding.empty()) { |
2277 prefs->ClearPref(prefs::kDefaultCharset); | 2287 prefs->ClearPref(prefs::kDefaultCharset); |
2278 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); | 2288 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); |
2279 } | 2289 } |
2280 DCHECK(!web_prefs->default_encoding.empty()); | 2290 DCHECK(!web_prefs->default_encoding.empty()); |
2281 | 2291 |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2612 switches::kDisableWebRtcEncryption, | 2622 switches::kDisableWebRtcEncryption, |
2613 }; | 2623 }; |
2614 to_command_line->CopySwitchesFrom(from_command_line, | 2624 to_command_line->CopySwitchesFrom(from_command_line, |
2615 kWebRtcDevSwitchNames, | 2625 kWebRtcDevSwitchNames, |
2616 arraysize(kWebRtcDevSwitchNames)); | 2626 arraysize(kWebRtcDevSwitchNames)); |
2617 } | 2627 } |
2618 } | 2628 } |
2619 #endif // defined(ENABLE_WEBRTC) | 2629 #endif // defined(ENABLE_WEBRTC) |
2620 | 2630 |
2621 } // namespace chrome | 2631 } // namespace chrome |
OLD | NEW |