| 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 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 web_prefs->asynchronous_spell_checking_enabled = true; | 2272 web_prefs->asynchronous_spell_checking_enabled = true; |
| 2272 web_prefs->unified_textchecker_enabled = true; | 2273 web_prefs->unified_textchecker_enabled = true; |
| 2273 | 2274 |
| 2274 web_prefs->uses_universal_detector = | 2275 web_prefs->uses_universal_detector = |
| 2275 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 2276 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
| 2276 web_prefs->text_areas_are_resizable = | 2277 web_prefs->text_areas_are_resizable = |
| 2277 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 2278 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
| 2278 web_prefs->hyperlink_auditing_enabled = | 2279 web_prefs->hyperlink_auditing_enabled = |
| 2279 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); | 2280 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
| 2280 | 2281 |
| 2282 #if defined(ENABLE_EXTENSIONS) |
| 2283 std::string image_animation_policy = |
| 2284 prefs->GetString(prefs::kAnimationPolicy); |
| 2285 if (image_animation_policy == kAnimationPolicyOnce) |
| 2286 web_prefs->animation_policy = |
| 2287 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| 2288 else if (image_animation_policy == kAnimationPolicyNone) |
| 2289 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| 2290 else |
| 2291 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| 2292 #endif |
| 2293 |
| 2281 // Make sure we will set the default_encoding with canonical encoding name. | 2294 // Make sure we will set the default_encoding with canonical encoding name. |
| 2282 web_prefs->default_encoding = | 2295 web_prefs->default_encoding = |
| 2283 CharacterEncoding::GetCanonicalEncodingNameByAliasName( | 2296 CharacterEncoding::GetCanonicalEncodingNameByAliasName( |
| 2284 web_prefs->default_encoding); | 2297 web_prefs->default_encoding); |
| 2285 if (web_prefs->default_encoding.empty()) { | 2298 if (web_prefs->default_encoding.empty()) { |
| 2286 prefs->ClearPref(prefs::kDefaultCharset); | 2299 prefs->ClearPref(prefs::kDefaultCharset); |
| 2287 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); | 2300 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); |
| 2288 } | 2301 } |
| 2289 DCHECK(!web_prefs->default_encoding.empty()); | 2302 DCHECK(!web_prefs->default_encoding.empty()); |
| 2290 | 2303 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 switches::kDisableWebRtcEncryption, | 2660 switches::kDisableWebRtcEncryption, |
| 2648 }; | 2661 }; |
| 2649 to_command_line->CopySwitchesFrom(from_command_line, | 2662 to_command_line->CopySwitchesFrom(from_command_line, |
| 2650 kWebRtcDevSwitchNames, | 2663 kWebRtcDevSwitchNames, |
| 2651 arraysize(kWebRtcDevSwitchNames)); | 2664 arraysize(kWebRtcDevSwitchNames)); |
| 2652 } | 2665 } |
| 2653 } | 2666 } |
| 2654 #endif // defined(ENABLE_WEBRTC) | 2667 #endif // defined(ENABLE_WEBRTC) |
| 2655 | 2668 |
| 2656 } // namespace chrome | 2669 } // namespace chrome |
| OLD | NEW |