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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 #if !defined(DISABLE_NACL) | 216 #if !defined(DISABLE_NACL) |
217 #include "components/nacl/browser/nacl_browser.h" | 217 #include "components/nacl/browser/nacl_browser.h" |
218 #include "components/nacl/browser/nacl_host_message_filter.h" | 218 #include "components/nacl/browser/nacl_host_message_filter.h" |
219 #include "components/nacl/browser/nacl_process_host.h" | 219 #include "components/nacl/browser/nacl_process_host.h" |
220 #include "components/nacl/common/nacl_process_type.h" | 220 #include "components/nacl/common/nacl_process_type.h" |
221 #include "components/nacl/common/nacl_switches.h" | 221 #include "components/nacl/common/nacl_switches.h" |
222 #endif | 222 #endif |
223 | 223 |
224 #if defined(ENABLE_EXTENSIONS) | 224 #if defined(ENABLE_EXTENSIONS) |
| 225 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
225 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" | 226 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
226 #include "chrome/browser/extensions/extension_util.h" | 227 #include "chrome/browser/extensions/extension_util.h" |
227 #include "chrome/browser/media/cast_transport_host_filter.h" | 228 #include "chrome/browser/media/cast_transport_host_filter.h" |
228 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | 229 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
229 #include "extensions/browser/extension_registry.h" | 230 #include "extensions/browser/extension_registry.h" |
230 #include "extensions/browser/guest_view/guest_view_base.h" | 231 #include "extensions/browser/guest_view/guest_view_base.h" |
231 #include "extensions/browser/guest_view/guest_view_manager.h" | 232 #include "extensions/browser/guest_view/guest_view_manager.h" |
232 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 233 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
233 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 234 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
234 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" | 235 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" |
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 web_prefs->asynchronous_spell_checking_enabled = true; | 2213 web_prefs->asynchronous_spell_checking_enabled = true; |
2213 web_prefs->unified_textchecker_enabled = true; | 2214 web_prefs->unified_textchecker_enabled = true; |
2214 | 2215 |
2215 web_prefs->uses_universal_detector = | 2216 web_prefs->uses_universal_detector = |
2216 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 2217 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
2217 web_prefs->text_areas_are_resizable = | 2218 web_prefs->text_areas_are_resizable = |
2218 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 2219 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
2219 web_prefs->hyperlink_auditing_enabled = | 2220 web_prefs->hyperlink_auditing_enabled = |
2220 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); | 2221 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
2221 | 2222 |
| 2223 #if defined(ENABLE_EXTENSIONS) |
| 2224 std::string image_animation_policy = |
| 2225 prefs->GetString(prefs::kAnimationPolicy); |
| 2226 if (image_animation_policy == kAnimationPolicyOnce) |
| 2227 web_prefs->animation_policy = |
| 2228 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| 2229 else if (image_animation_policy == kAnimationPolicyNone) |
| 2230 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| 2231 else |
| 2232 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| 2233 #endif |
| 2234 |
2222 // Make sure we will set the default_encoding with canonical encoding name. | 2235 // Make sure we will set the default_encoding with canonical encoding name. |
2223 web_prefs->default_encoding = | 2236 web_prefs->default_encoding = |
2224 CharacterEncoding::GetCanonicalEncodingNameByAliasName( | 2237 CharacterEncoding::GetCanonicalEncodingNameByAliasName( |
2225 web_prefs->default_encoding); | 2238 web_prefs->default_encoding); |
2226 if (web_prefs->default_encoding.empty()) { | 2239 if (web_prefs->default_encoding.empty()) { |
2227 prefs->ClearPref(prefs::kDefaultCharset); | 2240 prefs->ClearPref(prefs::kDefaultCharset); |
2228 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); | 2241 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); |
2229 } | 2242 } |
2230 DCHECK(!web_prefs->default_encoding.empty()); | 2243 DCHECK(!web_prefs->default_encoding.empty()); |
2231 | 2244 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2609 switches::kDisableWebRtcEncryption, | 2622 switches::kDisableWebRtcEncryption, |
2610 }; | 2623 }; |
2611 to_command_line->CopySwitchesFrom(from_command_line, | 2624 to_command_line->CopySwitchesFrom(from_command_line, |
2612 kWebRtcDevSwitchNames, | 2625 kWebRtcDevSwitchNames, |
2613 arraysize(kWebRtcDevSwitchNames)); | 2626 arraysize(kWebRtcDevSwitchNames)); |
2614 } | 2627 } |
2615 } | 2628 } |
2616 #endif // defined(ENABLE_WEBRTC) | 2629 #endif // defined(ENABLE_WEBRTC) |
2617 | 2630 |
2618 } // namespace chrome | 2631 } // namespace chrome |
OLD | NEW |