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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 #if !defined(DISABLE_NACL) | 214 #if !defined(DISABLE_NACL) |
215 #include "components/nacl/browser/nacl_browser.h" | 215 #include "components/nacl/browser/nacl_browser.h" |
216 #include "components/nacl/browser/nacl_host_message_filter.h" | 216 #include "components/nacl/browser/nacl_host_message_filter.h" |
217 #include "components/nacl/browser/nacl_process_host.h" | 217 #include "components/nacl/browser/nacl_process_host.h" |
218 #include "components/nacl/common/nacl_process_type.h" | 218 #include "components/nacl/common/nacl_process_type.h" |
219 #include "components/nacl/common/nacl_switches.h" | 219 #include "components/nacl/common/nacl_switches.h" |
220 #endif | 220 #endif |
221 | 221 |
222 #if defined(ENABLE_EXTENSIONS) | 222 #if defined(ENABLE_EXTENSIONS) |
| 223 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
223 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" | 224 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
224 #include "chrome/browser/extensions/extension_util.h" | 225 #include "chrome/browser/extensions/extension_util.h" |
225 #include "chrome/browser/media/cast_transport_host_filter.h" | 226 #include "chrome/browser/media/cast_transport_host_filter.h" |
226 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | 227 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
227 #include "extensions/browser/extension_registry.h" | 228 #include "extensions/browser/extension_registry.h" |
228 #include "extensions/browser/guest_view/guest_view_base.h" | 229 #include "extensions/browser/guest_view/guest_view_base.h" |
229 #include "extensions/browser/guest_view/guest_view_manager.h" | 230 #include "extensions/browser/guest_view/guest_view_manager.h" |
230 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 231 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
231 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 232 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
232 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" | 233 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" |
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 web_prefs->asynchronous_spell_checking_enabled = true; | 2287 web_prefs->asynchronous_spell_checking_enabled = true; |
2287 web_prefs->unified_textchecker_enabled = true; | 2288 web_prefs->unified_textchecker_enabled = true; |
2288 | 2289 |
2289 web_prefs->uses_universal_detector = | 2290 web_prefs->uses_universal_detector = |
2290 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 2291 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
2291 web_prefs->text_areas_are_resizable = | 2292 web_prefs->text_areas_are_resizable = |
2292 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 2293 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
2293 web_prefs->hyperlink_auditing_enabled = | 2294 web_prefs->hyperlink_auditing_enabled = |
2294 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); | 2295 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
2295 | 2296 |
| 2297 #if defined(ENABLE_EXTENSIONS) |
| 2298 std::string image_animation_policy = |
| 2299 prefs->GetString(prefs::kAnimationPolicy); |
| 2300 if (image_animation_policy == kAnimationPolicyOnce) |
| 2301 web_prefs->animation_policy = |
| 2302 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| 2303 else if (image_animation_policy == kAnimationPolicyNone) |
| 2304 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| 2305 else |
| 2306 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| 2307 #endif |
| 2308 |
2296 // Make sure we will set the default_encoding with canonical encoding name. | 2309 // Make sure we will set the default_encoding with canonical encoding name. |
2297 web_prefs->default_encoding = | 2310 web_prefs->default_encoding = |
2298 CharacterEncoding::GetCanonicalEncodingNameByAliasName( | 2311 CharacterEncoding::GetCanonicalEncodingNameByAliasName( |
2299 web_prefs->default_encoding); | 2312 web_prefs->default_encoding); |
2300 if (web_prefs->default_encoding.empty()) { | 2313 if (web_prefs->default_encoding.empty()) { |
2301 prefs->ClearPref(prefs::kDefaultCharset); | 2314 prefs->ClearPref(prefs::kDefaultCharset); |
2302 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); | 2315 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); |
2303 } | 2316 } |
2304 DCHECK(!web_prefs->default_encoding.empty()); | 2317 DCHECK(!web_prefs->default_encoding.empty()); |
2305 | 2318 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 switches::kDisableWebRtcEncryption, | 2675 switches::kDisableWebRtcEncryption, |
2663 }; | 2676 }; |
2664 to_command_line->CopySwitchesFrom(from_command_line, | 2677 to_command_line->CopySwitchesFrom(from_command_line, |
2665 kWebRtcDevSwitchNames, | 2678 kWebRtcDevSwitchNames, |
2666 arraysize(kWebRtcDevSwitchNames)); | 2679 arraysize(kWebRtcDevSwitchNames)); |
2667 } | 2680 } |
2668 } | 2681 } |
2669 #endif // defined(ENABLE_WEBRTC) | 2682 #endif // defined(ENABLE_WEBRTC) |
2670 | 2683 |
2671 } // namespace chrome | 2684 } // namespace chrome |
OLD | NEW |